Insights into IL-1 Family Cytokines in Kidney Allograft Transplantation: IL-18BP and Free IL-18 as Emerging Biomarkers

Statistical report - data exploration and statistical analysis

Author

Cecrdlova et al.



Authors’ affiliations:

Cecrdlova E1, Krupickova L1, Fialova M1, Novotny M2, Svachova V1, Mezerova K1, Tichanek F3, Viklicky O2, Striz I1

1Department of Clinical and Transplant Immunology

2Department of Nephrology

3Department of Data Science

Institute for Clinical and Experimental Medicine, Prague, Czech Republic



Original publication

This is statistical report of for the publication Insights into IL-1 Family Cytokines in Kidney Allograft Transplantation: IL-18BP and Free IL-18 as Emerging Biomarkers, cuurently under reveiw in the Cytokine journal


When using this code, cite original publication:

TO BE ADDED


Original GitHub repository: https://github.com/filip-tichanek/il1_TX


1 Packages and functions

Open code
if (T) {rm(list = ls() )}
if (T) { 
  suppressWarnings(suppressMessages({
    library(tidyverse)
    library(stringr)
    library(ggpubr)
    library(emmeans)
    library(gtsummary)
    library(car)
    library(sjPlot)
    library(flextable)
    library(openxlsx)
    library(mgcv)
    library(pROC)
    library(cowplot)
    library(boot)
    library(glmnet)
    library(brms)
    library(projpred)
    library(RJDBC)
    library(janitor)
    library(arm)
    library(corrplot)
    library(lubridate)
    library(kableExtra)    
    library(ggdist)
    library(bayesplot)
    library(coxed)
    library(quantreg)
    library(rstudioapi)
    library(effects)
    library(lqmm)
    
    # Functions clashes
    select <- dplyr::select
    rename <- dplyr::rename
    mutate <- dplyr::mutate
    recode <- dplyr::recode
    summarize <- dplyr::summarize
    count <- dplyr::count
    
    # Simple math functions
    logit <-function(x){log(x/(1-x))}
    inv.logit <- function(x){exp(x)/(1+exp(x))}
  }))
}

1.1 run_model function

The function to (i) load OR (ii) run & save (if has not been done previously) results of any computation or complex table production

Open code
run <- function(expr, path, reuse = TRUE) {
  # Initialize 'fit' to NULL to ensure it's always defined
  fit <- NULL

  # Construct the file path only if 'reuse' is TRUE
  if (reuse) {
    path <- paste0(path, ".Rds")
    fit <- suppressWarnings(try(readRDS(path), silent = TRUE))

    # Check if 'fit' is an error (file not found or couldn't be read)
    if (inherits(fit, "try-error")) {
      fit <- NULL
    }
  }

  # If 'fit' is NULL (either because 'reuse' is FALSE, or the file couldn't be read), evaluate 'expr'
  if (is.null(fit)) {
    fit <- eval(substitute(expr))

    # Save 'fit' only if 'reuse' is TRUE and a valid 'path' is provided
    if (reuse && !is.null(path) && nzchar(path)) {
      saveRDS(fit, file = path)
    }
  }
  return(fit)
}

1.2 Data upload

Open code
patient_table <- read.table('data/pat_data.txt')
patient_table <- patient_table %>% select(-c(Patient, date_of_rejection,
                                             bid, Dg)) %>% 
  mutate(induction_therapy = factor(induction_therapy), # Ensure it's a factor
         induction_therapy = fct_collapse(induction_therapy,
                                           ATG = c("ATG", "ATG+ Infliximab", "ATG+Infliximab"),
                                           basiliximab = "Simulect"))
  
    
summary(patient_table)
##       id            rejection_afterTX    group           receiver_sex      
##  Length:186         Min.   :  6.00    Length:186         Length:186        
##  Class :character   1st Qu.: 17.25    Class :character   Class :character  
##  Mode  :character   Median : 69.50    Mode  :character   Mode  :character  
##                     Mean   :100.30                                         
##                     3rd Qu.:110.25                                         
##                     Max.   :505.00                                         
##                     NA's   :142                                            
##   receiver_age    donor_sex           donor_age       N_mismatch   
##  Min.   :22.00   Length:186         Min.   : 1.00   Min.   :0.000  
##  1st Qu.:45.00   Class :character   1st Qu.:44.00   1st Qu.:2.250  
##  Median :56.50   Mode  :character   Median :55.00   Median :3.000  
##  Mean   :54.67                      Mean   :52.80   Mean   :3.304  
##  3rd Qu.:65.00                      3rd Qu.:64.75   3rd Qu.:4.000  
##  Max.   :80.00                      Max.   :81.00   Max.   :6.000  
##  NA's   :48                         NA's   :48      NA's   :48     
##      dsa              anti_hla            PRA_max        PRA_actual  
##  Length:186         Length:186         Min.   : 0.00   Min.   : 0.0  
##  Class :character   Class :character   1st Qu.: 2.25   1st Qu.: 0.0  
##  Mode  :character   Mode  :character   Median :10.00   Median : 2.0  
##                                        Mean   :19.09   Mean   :11.6  
##                                        3rd Qu.:29.50   3rd Qu.:11.5  
##                                        Max.   :98.00   Max.   :92.0  
##                                        NA's   :48      NA's   :48    
##  hemodialysis_years    TX_order         ebv                cmv           
##  Min.   : 0.000     Min.   :1.000   Length:186         Length:186        
##  1st Qu.: 1.400     1st Qu.:1.000   Class :character   Class :character  
##  Median : 2.300     Median :1.000   Mode  :character   Mode  :character  
##  Mean   : 3.047     Mean   :1.109                                        
##  3rd Qu.: 4.000     3rd Qu.:1.000                                        
##  Max.   :11.900     Max.   :4.000                                        
##  NA's   :49         NA's   :48                                           
##    CIT_hours      MT_minutes      induction_therapy   tacrolimus    
##  Min.   : 0.0   Min.   : 7.00   ATG        :77      Min.   :0.0000  
##  1st Qu.:12.0   1st Qu.:19.00   ATG,PE,IVIG:18      1st Qu.:1.0000  
##  Median :14.0   Median :24.00   basiliximab:43      Median :1.0000  
##  Mean   :13.7   Mean   :25.37   NA's       :48      Mean   :0.9783  
##  3rd Qu.:16.0   3rd Qu.:29.75                       3rd Qu.:1.0000  
##  Max.   :24.0   Max.   :57.00                       Max.   :1.0000  
##  NA's   :48     NA's   :48                          NA's   :48      
##       MMF              mTOR          dsa_at_tx         dsa_de_novo       
##  Min.   :0.0000   Min.   :0.00000   Length:186         Length:186        
##  1st Qu.:1.0000   1st Qu.:0.00000   Class :character   Class :character  
##  Median :1.0000   Median :0.00000   Mode  :character   Mode  :character  
##  Mean   :0.9275   Mean   :0.02174                                        
##  3rd Qu.:1.0000   3rd Qu.:0.00000                                        
##  Max.   :1.0000   Max.   :1.00000                                        
##  NA's   :48       NA's   :48                                             
##    egfr_mean      creatinine_mean    il1_a_mean        il1_b_mean     
##  Min.   :0.1367   Min.   :  53.0   Min.   : 0.1751   Min.   : 0.3786  
##  1st Qu.:0.4558   1st Qu.: 119.0   1st Qu.: 1.4411   1st Qu.: 8.0770  
##  Median :0.6637   Median : 256.5   Median : 3.7232   Median :12.7858  
##  Mean   :0.7719   Mean   : 278.5   Mean   : 5.0087   Mean   :12.2006  
##  3rd Qu.:0.9631   3rd Qu.: 365.1   3rd Qu.: 6.5541   3rd Qu.:14.7499  
##  Max.   :1.8800   Max.   :1172.8   Max.   :46.6601   Max.   :48.9390  
##                                                                       
##   il1_ra_mean          il18_mean         il18_bp_mean   il18_free_mean   
##  Min.   :    1.355   Min.   :   1.501   Min.   : 1946   Min.   :  77.51  
##  1st Qu.:  667.896   1st Qu.: 278.570   1st Qu.: 2990   1st Qu.: 206.94  
##  Median : 1147.610   Median : 431.502   Median : 3438   Median : 317.76  
##  Mean   : 1624.957   Mean   : 653.351   Mean   : 3587   Mean   : 456.12  
##  3rd Qu.: 2031.337   3rd Qu.: 782.363   3rd Qu.: 4009   3rd Qu.: 565.57  
##  Max.   :12548.295   Max.   :5015.730   Max.   :11804   Max.   :3279.54  
##                                         NA's   :17      NA's   :17       
##   il36_b_mean     
##  Min.   : 0.0258  
##  1st Qu.: 2.4952  
##  Median : 3.7044  
##  Mean   : 5.0883  
##  3rd Qu.: 5.7242  
##  Max.   :53.5479  
## 

data_long <- read.table('data/long_data.txt')
data_long <- data_long %>% select(-Patient)
summary(data_long)
##       id             time_point           group              id_obs         
##  Length:596         Length:596         Length:596         Length:596        
##  Class :character   Class :character   Class :character   Class :character  
##  Mode  :character   Mode  :character   Mode  :character   Mode  :character  
##                                                                             
##                                                                             
##                                                                             
##                                                                             
##   il1_a_value       il1_b_value        il1_ra_value         il18_value      
##  Min.   : 0.1751   Min.   :  0.3786   Min.   :    1.355   Min.   :   1.501  
##  1st Qu.: 2.2933   1st Qu.: 11.1629   1st Qu.:  665.718   1st Qu.: 279.288  
##  Median : 3.7308   Median : 12.7285   Median : 1032.425   Median : 448.818  
##  Mean   : 5.5595   Mean   : 13.6417   Mean   : 1767.633   Mean   : 715.676  
##  3rd Qu.: 6.3253   3rd Qu.: 14.3496   3rd Qu.: 1745.067   3rd Qu.: 693.103  
##  Max.   :62.5197   Max.   :154.9024   Max.   :24279.375   Max.   :9421.688  
##  NA's   :96        NA's   :96         NA's   :96          NA's   :96        
##  il18_bp_value      il18_bp_ratio        il18_free        il36_b_value    
##  Min.   :   82.47   Min.   :   3.765   Min.   :  37.62   Min.   : 0.0258  
##  1st Qu.: 2976.00   1st Qu.:  31.140   1st Qu.: 193.99   1st Qu.: 2.3362  
##  Median : 3543.00   Median :  50.540   Median : 317.73   Median : 3.6714  
##  Mean   : 3708.59   Mean   :  87.717   Mean   : 486.13   Mean   : 5.5442  
##  3rd Qu.: 4168.00   3rd Qu.:  81.141   3rd Qu.: 476.33   3rd Qu.: 5.5809  
##  Max.   :30834.43   Max.   :2967.066   Max.   :6155.32   Max.   :90.0555  
##  NA's   :19         NA's   :115        NA's   :115       NA's   :96       
##    creatinine          egfr       
##  Min.   :  53.0   Min.   :0.0300  
##  1st Qu.: 114.1   1st Qu.:0.1600  
##  Median : 169.7   Median :0.5800  
##  Mean   : 316.8   Mean   :0.6237  
##  3rd Qu.: 481.1   3rd Qu.:0.9300  
##  Max.   :1778.9   Max.   :1.8800  
## 

2 Summary statistics

Summary table for all relevant variables

2.1 Healthy included

2.1.1 Continuous variables with median and quartiles

Open code
sumtab1 <- run(
 patient_table %>% select(-id, -rejection_afterTX) %>% 
  tbl_summary( by='group',
               type = list(hemodialysis_years ~ 'continuous',
                           N_mismatch ~ 'continuous')
               ) %>%
  modify_caption('Subjects characteristics according to group (healthy vs. with acute rejection vs. no acute rejection') %>% 
   add_p(),
 path = 'gitignore/run/sumtab1', reuse=TRUE)

sumtab1
Subjects characteristics according to group (healthy vs. with acute rejection vs. no acute rejection
Characteristic acute_rejection, N = 441 healthy, N = 481 no_rejection, N = 941 p-value2
receiver_sex


0.075
    female 16 (36%) 26 (54%) 33 (35%)
    male 28 (64%) 22 (46%) 61 (65%)
receiver_age 54 (44, 62) NA (NA, NA) 58 (46, 66) 0.14
    Unknown 0 48 0
donor_sex


>0.9
    female 18 (41%) 0 (NA%) 37 (39%)
    male 26 (59%) 0 (NA%) 57 (61%)
    Unknown 0 48 0
donor_age 51 (42, 58) NA (NA, NA) 57 (46, 66) 0.066
    Unknown 0 48 0
N_mismatch 3 (2, 4) NA (NA, NA) 3 (3, 4) >0.9
    Unknown 0 48 0
dsa


0.002
    neg 27 (61%) 0 (NA%) 81 (86%)
    pos 17 (39%) 0 (NA%) 13 (14%)
    Unknown 0 48 0
anti_hla


0.032
    N/A 0 (0%) 0 (NA%) 1 (1.1%)
    neg 27 (61%) 0 (NA%) 75 (80%)
    pos 17 (39%) 0 (NA%) 18 (19%)
    Unknown 0 48 0
PRA_max 10 (3, 29) NA (NA, NA) 10 (2, 30) 0.9
    Unknown 0 48 0
PRA_actual 2 (0, 6) NA (NA, NA) 2 (0, 20) 0.3
    Unknown 0 48 0
hemodialysis_years 2.30 (1.40, 3.90) NA (NA, NA) 2.30 (1.30, 4.00) >0.9
    Unknown 0 48 1
TX_order


<0.001
    1 32 (73%) 0 (NA%) 93 (99%)
    2 11 (25%) 0 (NA%) 1 (1.1%)
    4 1 (2.3%) 0 (NA%) 0 (0%)
    Unknown 0 48 0
ebv


>0.9
    neg 0 (0%) 0 (NA%) 2 (2.8%)
    pos 35 (100%) 0 (NA%) 69 (97%)
    Unknown 9 48 23
cmv


0.2
    N/A 0 (0%) 0 (NA%) 1 (1.1%)
    neg 10 (23%) 0 (NA%) 11 (12%)
    pos 34 (77%) 0 (NA%) 82 (87%)
    Unknown 0 48 0
CIT_hours 15 (12, 18) NA (NA, NA) 14 (12, 16) 0.093
    Unknown 0 48 0
MT_minutes 22 (18, 27) NA (NA, NA) 25 (20, 31) 0.051
    Unknown 0 48 0
induction_therapy


0.004
    ATG 14 (32%) 0 (NA%) 57 (61%)
    ATG,PE,IVIG 10 (23%) 0 (NA%) 8 (8.5%)
    ATG+ Infliximab 1 (2.3%) 0 (NA%) 0 (0%)
    ATG+Infliximab 3 (6.8%) 0 (NA%) 2 (2.1%)
    Simulect 16 (36%) 0 (NA%) 27 (29%)
    Unknown 0 48 0
tacrolimus 44 (100%) 0 (NA%) 91 (97%) 0.6
    Unknown 0 48 0
MMF 39 (89%) 0 (NA%) 89 (95%) 0.3
    Unknown 0 48 0
mTOR 0 (0%) 0 (NA%) 3 (3.2%) 0.6
    Unknown 0 48 0
egfr_mean 0.49 (0.35, 0.65) 1.48 (1.15, 1.63) 0.55 (0.41, 0.72) <0.001
creatinine_mean 318 (246, 385) 85 (71, 97) 307 (235, 412) <0.001
il1_a_mean 3.6 (2.9, 4.7) 0.2 (0.2, 0.9) 5.4 (3.5, 10.2) <0.001
il1_b_mean 13.4 (12.5, 14.5) 3.8 (2.9, 4.4) 13.7 (12.2, 16.3) <0.001
il1_ra_mean 1,291 (880, 2,044) 440 (321, 577) 1,418 (1,060, 2,738) <0.001
il18_mean 626 (389, 907) 196 (146, 280) 554 (371, 1,010) <0.001
il18_bp_mean 3,389 (2,999, 3,997) 2,813 (2,465, 3,074) 3,649 (3,346, 4,194) <0.001
    Unknown 0 17 0
il18_free_mean 418 (268, 608) 145 (121, 194) 359 (236, 647) <0.001
    Unknown 0 17 0
il36_b_mean 3.5 (2.5, 4.2) 1.8 (1.3, 2.5) 5.1 (3.8, 7.2) <0.001
1 n (%); Median (IQR)
2 Pearson’s Chi-squared test; Kruskal-Wallis rank sum test; Fisher’s exact test

2.1.2 Creatinine and EGFR median and range

Open code
sumtab1b <- run(
 patient_table %>% select(-id, -rejection_afterTX) %>% 
  tbl_summary( by='group',
               type = list(hemodialysis_years ~ 'continuous',
                           N_mismatch ~ 'continuous',
                           all_continuous()  ~ "continuous2"),
              statistic = list(all_continuous() ~ c(
                "{median} ({min}, {max})")))  %>%
  modify_caption('Subjects characteristics according to group (healthy vs. with acute rejection vs. no acute rejection') %>% 
   add_p(),
 path = 'gitignore/run/sumtab1b', reuse=TRUE)

sumtab1b
Subjects characteristics according to group (healthy vs. with acute rejection vs. no acute rejection
Characteristic acute_rejection, N = 441 healthy, N = 481 no_rejection, N = 941 p-value2
receiver_sex


0.075
    female 16 (36%) 26 (54%) 33 (35%)
    male 28 (64%) 22 (46%) 61 (65%)
receiver_age


0.14
    Median (Range) 54 (23, 79) NA (Inf, -Inf) 58 (22, 80)
    Unknown 0 48 0
donor_sex


>0.9
    female 18 (41%) 0 (NA%) 37 (39%)
    male 26 (59%) 0 (NA%) 57 (61%)
    Unknown 0 48 0
donor_age


0.066
    Median (Range) 51 (21, 75) NA (Inf, -Inf) 57 (1, 81)
    Unknown 0 48 0
N_mismatch 3 (0, 6) NA (Inf, -Inf) 3 (1, 6) >0.9
    Unknown 0 48 0
dsa


0.002
    neg 27 (61%) 0 (NA%) 81 (86%)
    pos 17 (39%) 0 (NA%) 13 (14%)
    Unknown 0 48 0
anti_hla


0.032
    N/A 0 (0%) 0 (NA%) 1 (1.1%)
    neg 27 (61%) 0 (NA%) 75 (80%)
    pos 17 (39%) 0 (NA%) 18 (19%)
    Unknown 0 48 0
PRA_max


0.9
    Median (Range) 10 (0, 92) NA (Inf, -Inf) 10 (0, 98)
    Unknown 0 48 0
PRA_actual


0.3
    Median (Range) 2 (0, 92) NA (Inf, -Inf) 2 (0, 78)
    Unknown 0 48 0
hemodialysis_years


>0.9
    Median (Range) 2.30 (0.00, 10.90) NA (Inf, -Inf) 2.30 (0.00, 11.90)
    Unknown 0 48 1
TX_order


<0.001
    1 32 (73%) 0 (NA%) 93 (99%)
    2 11 (25%) 0 (NA%) 1 (1.1%)
    4 1 (2.3%) 0 (NA%) 0 (0%)
    Unknown 0 48 0
ebv


>0.9
    neg 0 (0%) 0 (NA%) 2 (2.8%)
    pos 35 (100%) 0 (NA%) 69 (97%)
    Unknown 9 48 23
cmv


0.2
    N/A 0 (0%) 0 (NA%) 1 (1.1%)
    neg 10 (23%) 0 (NA%) 11 (12%)
    pos 34 (77%) 0 (NA%) 82 (87%)
    Unknown 0 48 0
CIT_hours


0.093
    Median (Range) 15 (0, 21) NA (Inf, -Inf) 14 (0, 24)
    Unknown 0 48 0
MT_minutes


0.051
    Median (Range) 22 (15, 49) NA (Inf, -Inf) 25 (7, 57)
    Unknown 0 48 0
induction_therapy


0.004
    ATG 14 (32%) 0 (NA%) 57 (61%)
    ATG,PE,IVIG 10 (23%) 0 (NA%) 8 (8.5%)
    ATG+ Infliximab 1 (2.3%) 0 (NA%) 0 (0%)
    ATG+Infliximab 3 (6.8%) 0 (NA%) 2 (2.1%)
    Simulect 16 (36%) 0 (NA%) 27 (29%)
    Unknown 0 48 0
tacrolimus 44 (100%) 0 (NA%) 91 (97%) 0.6
    Unknown 0 48 0
MMF 39 (89%) 0 (NA%) 89 (95%) 0.3
    Unknown 0 48 0
mTOR 0 (0%) 0 (NA%) 3 (3.2%) 0.6
    Unknown 0 48 0
egfr_mean


<0.001
    Median (Range) 0.49 (0.14, 1.21) 1.48 (0.82, 1.88) 0.55 (0.15, 1.23)
creatinine_mean


<0.001
    Median (Range) 318 (92, 1,173) 85 (53, 136) 307 (117, 813)
il1_a_mean


<0.001
    Median (Range) 3.6 (1.2, 25.7) 0.2 (0.2, 46.7) 5.4 (0.2, 29.8)
il1_b_mean


<0.001
    Median (Range) 13.4 (10.8, 19.7) 3.8 (0.4, 45.4) 13.7 (10.0, 48.9)
il1_ra_mean


<0.001
    Median (Range) 1,291 (504, 6,224) 440 (1, 2,636) 1,418 (448, 12,548)
il18_mean


<0.001
    Median (Range) 626 (185, 2,025) 196 (2, 499) 554 (127, 5,016)
il18_bp_mean


<0.001
    Median (Range) 3,389 (2,399, 6,127) 2,813 (1,946, 4,287) 3,649 (2,160, 11,804)
    Unknown 0 17 0
il18_free_mean


<0.001
    Median (Range) 418 (138, 1,486) 145 (78, 354) 359 (79, 3,280)
    Unknown 0 17 0
il36_b_mean


<0.001
    Median (Range) 3.5 (0.4, 53.5) 1.8 (0.0, 21.1) 5.1 (0.2, 26.7)
1 n (%); Median (Range)
2 Pearson’s Chi-squared test; Kruskal-Wallis rank sum test; Fisher’s exact test

2.2 TX patients only

2.2.1 Meidian + IQR

Open code
sumtab2 <- run(
 patient_table %>% select(-id, -rejection_afterTX) %>% 
   filter(group != 'healthy') %>% 
   mutate(group = factor(group)) %>% 
  tbl_summary( by='group',
               type = list(hemodialysis_years ~ 'continuous',
                           N_mismatch ~ 'continuous')
               ) %>%
  modify_caption('Patient characteristics according to developed acute rejection') %>% 
   add_p(),
 path = 'gitignore/run/sumtab2', reuse=TRUE)

sumtab2
Patient characteristics according to developed acute rejection
Characteristic acute_rejection, N = 441 no_rejection, N = 941 p-value2
receiver_sex

0.9
    female 16 (36%) 33 (35%)
    male 28 (64%) 61 (65%)
receiver_age 54 (44, 62) 58 (46, 66) 0.14
donor_sex

0.9
    female 18 (41%) 37 (39%)
    male 26 (59%) 57 (61%)
donor_age 51 (42, 58) 57 (46, 66) 0.066
N_mismatch 3 (2, 4) 3 (3, 4) >0.9
dsa

<0.001
    neg 27 (61%) 81 (86%)
    pos 17 (39%) 13 (14%)
anti_hla

0.032
    N/A 0 (0%) 1 (1.1%)
    neg 27 (61%) 75 (80%)
    pos 17 (39%) 18 (19%)
PRA_max 10 (3, 29) 10 (2, 30) 0.9
PRA_actual 2 (0, 6) 2 (0, 20) 0.3
hemodialysis_years 2.30 (1.40, 3.90) 2.30 (1.30, 4.00) >0.9
    Unknown 0 1
TX_order

<0.001
    1 32 (73%) 93 (99%)
    2 11 (25%) 1 (1.1%)
    4 1 (2.3%) 0 (0%)
ebv

>0.9
    neg 0 (0%) 2 (2.8%)
    pos 35 (100%) 69 (97%)
    Unknown 9 23
cmv

0.2
    N/A 0 (0%) 1 (1.1%)
    neg 10 (23%) 11 (12%)
    pos 34 (77%) 82 (87%)
CIT_hours 15 (12, 18) 14 (12, 16) 0.094
MT_minutes 22 (18, 27) 25 (20, 31) 0.051
induction_therapy

0.004
    ATG 14 (32%) 57 (61%)
    ATG,PE,IVIG 10 (23%) 8 (8.5%)
    ATG+ Infliximab 1 (2.3%) 0 (0%)
    ATG+Infliximab 3 (6.8%) 2 (2.1%)
    Simulect 16 (36%) 27 (29%)
tacrolimus 44 (100%) 91 (97%) 0.6
MMF 39 (89%) 89 (95%) 0.3
mTOR 0 (0%) 3 (3.2%) 0.6
egfr_mean 0.49 (0.35, 0.65) 0.55 (0.41, 0.72) 0.2
creatinine_mean 318 (246, 385) 307 (235, 412) 0.9
il1_a_mean 3.6 (2.9, 4.7) 5.4 (3.5, 10.2) 0.001
il1_b_mean 13.4 (12.5, 14.5) 13.7 (12.2, 16.3) 0.13
il1_ra_mean 1,291 (880, 2,044) 1,418 (1,060, 2,738) 0.10
il18_mean 626 (389, 907) 554 (371, 1,010) >0.9
il18_bp_mean 3,389 (2,999, 3,997) 3,649 (3,346, 4,194) 0.2
il18_free_mean 418 (268, 608) 359 (236, 647) 0.7
il36_b_mean 3.5 (2.5, 4.2) 5.1 (3.8, 7.2) <0.001
1 n (%); Median (IQR)
2 Pearson’s Chi-squared test; Wilcoxon rank sum test; Fisher’s exact test

2.2.2 Median + range

Open code
sumtab2b <- run(
 patient_table %>% select(-id, -rejection_afterTX) %>% 
   filter(group != 'healthy') %>% 
   mutate(group = factor(group)) %>% 
  tbl_summary( by='group',
               type = list(hemodialysis_years ~ 'continuous',
                           N_mismatch ~ 'continuous',
                           all_continuous()  ~ "continuous2"),
              statistic = list(all_continuous() ~ c(
                "{median} ({min}, {max})")))  %>%
  modify_caption('Patient characteristics according to developed acute rejection') %>% 
   add_p(),
 path = 'gitignore/run/sumtab2b', reuse=TRUE)

sumtab2b
Patient characteristics according to developed acute rejection
Characteristic acute_rejection, N = 441 no_rejection, N = 941 p-value2
receiver_sex

0.9
    female 16 (36%) 33 (35%)
    male 28 (64%) 61 (65%)
receiver_age

0.14
    Median (Range) 54 (23, 79) 58 (22, 80)
donor_sex

0.9
    female 18 (41%) 37 (39%)
    male 26 (59%) 57 (61%)
donor_age

0.066
    Median (Range) 51 (21, 75) 57 (1, 81)
N_mismatch 3 (0, 6) 3 (1, 6) >0.9
dsa

<0.001
    neg 27 (61%) 81 (86%)
    pos 17 (39%) 13 (14%)
anti_hla

0.032
    N/A 0 (0%) 1 (1.1%)
    neg 27 (61%) 75 (80%)
    pos 17 (39%) 18 (19%)
PRA_max

0.9
    Median (Range) 10 (0, 92) 10 (0, 98)
PRA_actual

0.3
    Median (Range) 2 (0, 92) 2 (0, 78)
hemodialysis_years

>0.9
    Median (Range) 2.30 (0.00, 10.90) 2.30 (0.00, 11.90)
    Unknown 0 1
TX_order

<0.001
    1 32 (73%) 93 (99%)
    2 11 (25%) 1 (1.1%)
    4 1 (2.3%) 0 (0%)
ebv

>0.9
    neg 0 (0%) 2 (2.8%)
    pos 35 (100%) 69 (97%)
    Unknown 9 23
cmv

0.2
    N/A 0 (0%) 1 (1.1%)
    neg 10 (23%) 11 (12%)
    pos 34 (77%) 82 (87%)
CIT_hours

0.094
    Median (Range) 15 (0, 21) 14 (0, 24)
MT_minutes

0.051
    Median (Range) 22 (15, 49) 25 (7, 57)
induction_therapy

0.004
    ATG 14 (32%) 57 (61%)
    ATG,PE,IVIG 10 (23%) 8 (8.5%)
    ATG+ Infliximab 1 (2.3%) 0 (0%)
    ATG+Infliximab 3 (6.8%) 2 (2.1%)
    Simulect 16 (36%) 27 (29%)
tacrolimus 44 (100%) 91 (97%) 0.6
MMF 39 (89%) 89 (95%) 0.3
mTOR 0 (0%) 3 (3.2%) 0.6
egfr_mean

0.2
    Median (Range) 0.49 (0.14, 1.21) 0.55 (0.15, 1.23)
creatinine_mean

0.9
    Median (Range) 318 (92, 1,173) 307 (117, 813)
il1_a_mean

0.001
    Median (Range) 3.6 (1.2, 25.7) 5.4 (0.2, 29.8)
il1_b_mean

0.13
    Median (Range) 13.4 (10.8, 19.7) 13.7 (10.0, 48.9)
il1_ra_mean

0.10
    Median (Range) 1,291 (504, 6,224) 1,418 (448, 12,548)
il18_mean

>0.9
    Median (Range) 626 (185, 2,025) 554 (127, 5,016)
il18_bp_mean

0.2
    Median (Range) 3,389 (2,399, 6,127) 3,649 (2,160, 11,804)
il18_free_mean

0.7
    Median (Range) 418 (138, 1,486) 359 (79, 3,280)
il36_b_mean

<0.001
    Median (Range) 3.5 (0.4, 53.5) 5.1 (0.2, 26.7)
1 n (%); Median (Range)
2 Pearson’s Chi-squared test; Wilcoxon rank sum test; Fisher’s exact test

2.3 Summary table for continuous variables

Open code
sumtab <- patient_table %>%
  select(
    receiver_age, donor_age,
    N_mismatch, PRA_max, PRA_actual, CIT_hours, MT_minutes,
    hemodialysis_years, group, il1_a_mean, il1_b_mean, il1_ra_mean,
    il18_mean, il18_bp_mean, il18_free_mean, il36_b_mean) %>% 
  group_by(group) %>%
  summarize(across(where(is.numeric), 
                   list(median = ~median(., na.rm = TRUE), 
                        mean = ~mean(., na.rm = TRUE), 
                        IQR = ~IQR(., na.rm = TRUE), 
                        Q25 = ~quantile(., 0.25, na.rm = TRUE), 
                        Q75 = ~quantile(., 0.75, na.rm = TRUE),
                        Q95 = ~quantile(., 0.95, na.rm = TRUE),
                        sd = ~sd(., na.rm = TRUE)), 
                   .names = "{.col}_{.fn}")) 
kableExtra::kable(t(sumtab)) 
group acute_rejection healthy no_rejection
receiver_age_median 54 NA 58
receiver_age_mean 52.15909 NA 55.85106
receiver_age_IQR 18.25 NA 19.75
receiver_age_Q25 44.00 NA 46.25
receiver_age_Q75 62.25 NA 66.00
receiver_age_Q95 73.4 NA 72.7
receiver_age_sd 13.95498 NA 13.41076
donor_age_median 51.0 NA 56.5
donor_age_mean 49.90909 NA 54.15957
donor_age_IQR 16.5 NA 20.0
donor_age_Q25 41.75 NA 46.00
donor_age_Q75 58.25 NA 66.00
donor_age_Q95 73.95 NA 74.35
donor_age_sd 14.00468 NA 15.41630
N_mismatch_median 3 NA 3
N_mismatch_mean 3.250000 NA 3.329787
N_mismatch_IQR 2 NA 1
N_mismatch_Q25 2 NA 3
N_mismatch_Q75 4 NA 4
N_mismatch_Q95 5 NA 5
N_mismatch_sd 1.331637 NA 1.212731
PRA_max_median 10 NA 10
PRA_max_mean 19.40909 NA 18.93617
PRA_max_IQR 26.25 NA 27.25
PRA_max_Q25 2.75 NA 2.25
PRA_max_Q75 29.0 NA 29.5
PRA_max_Q95 73.9 NA 52.7
PRA_max_sd 23.26322 NA 19.97407
PRA_actual_median 2 NA 2
PRA_actual_mean 10.00000 NA 12.35106
PRA_actual_IQR 6.0 NA 19.5
PRA_actual_Q25 0 NA 0
PRA_actual_Q75 6.0 NA 19.5
PRA_actual_Q95 69.7 NA 52.7
PRA_actual_sd 21.58703 NA 18.72191
CIT_hours_median 15 NA 14
CIT_hours_mean 14.31818 NA 13.40426
CIT_hours_IQR 6 NA 4
CIT_hours_Q25 12 NA 12
CIT_hours_Q75 18 NA 16
CIT_hours_Q95 21.00 NA 20.35
CIT_hours_sd 5.065950 NA 4.489699
MT_minutes_median 21.5 NA 25.0
MT_minutes_mean 23.90909 NA 26.05319
MT_minutes_IQR 8.50 NA 10.75
MT_minutes_Q25 18.00 NA 20.25
MT_minutes_Q75 26.5 NA 31.0
MT_minutes_Q95 42.85 NA 40.35
MT_minutes_sd 8.454580 NA 8.773576
hemodialysis_years_median 2.3 NA 2.3
hemodialysis_years_mean 2.972727 NA 3.082796
hemodialysis_years_IQR 2.5 NA 2.7
hemodialysis_years_Q25 1.4 NA 1.3
hemodialysis_years_Q75 3.9 NA 4.0
hemodialysis_years_Q95 7.055 NA 8.600
hemodialysis_years_sd 2.271396 NA 2.491273
il1_a_mean_median 3.6138431 0.1751254 5.4099081
il1_a_mean_mean 4.519618 1.790396 6.880929
il1_a_mean_IQR 1.8399964 0.7684427 6.6405988
il1_a_mean_Q25 2.8678507 0.1751254 3.5186279
il1_a_mean_Q75 4.7078471 0.9435681 10.1592267
il1_a_mean_Q95 7.953788 4.148860 16.998875
il1_a_mean_sd 3.702535 6.758296 5.079430
il1_b_mean_median 13.379882 3.800578 13.726654
il1_b_mean_mean 13.614621 4.568534 15.435899
il1_b_mean_IQR 2.016068 1.490545 4.087478
il1_b_mean_Q25 12.456512 2.865737 12.211393
il1_b_mean_Q75 14.472580 4.356282 16.298871
il1_b_mean_Q95 16.980015 6.139183 24.715130
il1_b_mean_sd 1.876318 6.136904 5.552799
il1_ra_mean_median 1291.0082 439.8988 1417.6213
il1_ra_mean_mean 1607.137 531.280 2191.771
il1_ra_mean_IQR 1163.9840 255.8475 1677.9097
il1_ra_mean_Q25 879.6144 320.7617 1059.8544
il1_ra_mean_Q75 2043.5983 576.6092 2737.7641
il1_ra_mean_Q95 3206.0827 895.6011 5748.7204
il1_ra_mean_sd 1054.4684 464.7765 1883.0248
il18_mean_median 626.2038 196.2464 553.9956
il18_mean_mean 706.7674 220.7274 849.2618
il18_mean_IQR 518.0835 133.1681 639.2590
il18_mean_Q25 388.6040 146.4606 370.9122
il18_mean_Q75 906.6875 279.6288 1010.1712
il18_mean_Q95 1546.9192 403.6279 2401.4965
il18_mean_sd 413.15414 99.47696 778.91956
il18_bp_mean_median 3389.167 2813.000 3649.250
il18_bp_mean_mean 3666.610 2854.484 3791.695
il18_bp_mean_IQR 998.5208 609.0000 847.5291
il18_bp_mean_Q25 2998.875 2465.000 3346.188
il18_bp_mean_Q75 3997.396 3074.000 4193.717
il18_bp_mean_Q95 5281.432 3746.500 4749.825
il18_bp_mean_sd 889.4910 514.8316 1053.8108
il18_free_mean_median 417.7738 144.8761 358.7065
il18_free_mean_mean 478.2362 164.6453 541.8925
il18_free_mean_IQR 339.20872 72.47453 411.11565
il18_free_mean_Q25 268.4762 121.4914 235.7412
il18_free_mean_Q75 607.6849 193.9659 646.8569
il18_free_mean_Q95 1059.7969 306.6846 1639.1865
il18_free_mean_sd 286.58937 69.54324 499.73260
il36_b_mean_median 3.516403 1.823203 5.079123
il36_b_mean_mean 5.616041 2.465567 6.180597
il36_b_mean_IQR 1.639928 1.250801 3.346720
il36_b_mean_Q25 2.543047 1.279165 3.806194
il36_b_mean_Q75 4.182975 2.529966 7.152914
il36_b_mean_Q95 19.429293 3.638789 12.446111
il36_b_mean_sd 8.701474 3.398531 4.137029

3 Patients with exceptional values of IL18 forms

Open code
data_long %>% arrange(il18_value) %>% slice_head(n=10)
##      id time_point           group  id_obs il1_a_value il1_b_value il1_ra_value
## 371 h13        000         healthy h13.000   2.3593983    4.828128     1.355488
## 420  13        007 acute_rejection  13.007   2.4200000    9.185659   660.616206
## 566 161        000 acute_rejection 161.000   3.9600000   13.434223   385.840570
## 207 149        007    no_rejection 149.007   2.5388224   10.038359   371.936954
## 567 161        007 acute_rejection 161.007   7.8800000   10.662728   606.625574
## 450  33        007 acute_rejection  33.007   2.5700000    9.874221   989.400140
## 229 164        007    no_rejection 164.007   5.0273935   10.038359   515.907780
## 473  50        007 acute_rejection  50.007   2.8700000    9.874221  1827.179202
## 359  h1        000         healthy  h1.000   0.9435681    4.484811   149.989122
## 377 h19        000         healthy h19.000   0.1751254    4.142265   398.060132
##     il18_value il18_bp_value il18_bp_ratio il18_free il36_b_value creatinine
## 371    1.50082            NA            NA        NA    1.3232372       72.3
## 420   65.98134      2659.000      9.925738  48.87983    3.0820967      148.0
## 566   79.35453      8429.987      3.765345  37.62289    5.0502303      549.7
## 207   83.78820      4430.000      7.565526  52.93353    4.4161526      979.6
## 567   90.06153      4042.000      8.912571  58.79296    4.2606163      477.2
## 450   91.15212      2984.000     12.218783  65.45315    3.3967893      147.0
## 229   93.21592      2716.000     13.728413  68.67400    3.9320018      127.6
## 473   93.45905      4168.000      8.969198  60.35764    3.2579483      804.6
## 359   97.75158      1946.000     20.092822  77.82443    0.2677636      102.8
## 377   99.82022      2187.000     18.257014  77.51443    3.1490548       65.9
##     egfr
## 371 1.87
## 420 0.51
## 566 0.10
## 207 0.08
## 567 0.12
## 450 0.83
## 229 0.66
## 473 0.09
## 359 1.25
## 377 1.78
data_long %>% arrange(il18_free) %>% slice_head(n=10)
##      id time_point           group  id_obs il1_a_value il1_b_value il1_ra_value
## 566 161        000 acute_rejection 161.000    3.960000   13.434223     385.8406
## 420  13        007 acute_rejection  13.007    2.420000    9.185659     660.6162
## 207 149        007    no_rejection 149.007    2.538822   10.038359     371.9370
## 567 161        007 acute_rejection 161.007    7.880000   10.662728     606.6256
## 473  50        007 acute_rejection  50.007    2.870000    9.874221    1827.1792
## 562 157        007 acute_rejection 157.007    2.570000    9.546168    1894.3570
## 450  33        007 acute_rejection  33.007    2.570000    9.874221     989.4001
## 229 164        007    no_rejection 164.007    5.027393   10.038359     515.9078
## 40   46        007    no_rejection  46.007    2.386611    9.480593     531.1226
## 39   46        000    no_rejection  46.000    2.872530    9.710157     798.2475
##     il18_value il18_bp_value il18_bp_ratio il18_free il36_b_value creatinine
## 566   79.35453      8429.987      3.765345  37.62289     5.050230      549.7
## 420   65.98134      2659.000      9.925738  48.87983     3.082097      148.0
## 207   83.78820      4430.000      7.565526  52.93353     4.416153      979.6
## 567   90.06153      4042.000      8.912571  58.79296     4.260616      477.2
## 473   93.45905      4168.000      8.969198  60.35764     3.257948      804.6
## 562  102.99198      4800.000      8.582665  63.12412     3.618840      485.2
## 450   91.15212      2984.000     12.218783  65.45315     3.396789      147.0
## 229   93.21592      2716.000     13.728413  68.67400     3.932002      127.6
## 40   104.22117      3283.000     12.698284  72.78148     3.727193      137.1
## 39   130.24469      5907.000      8.819685  73.28494     4.461622      618.2
##     egfr
## 566 0.10
## 420 0.51
## 207 0.08
## 567 0.12
## 473 0.09
## 562 0.15
## 450 0.83
## 229 0.66
## 40  0.77
## 39  0.13
data_long %>% arrange(il18_bp_value) %>% slice_head(n=10)
##      id time_point           group  id_obs il1_a_value il1_b_value il1_ra_value
## 117  94        007    no_rejection  94.007   2.4475376   10.761404    1809.0168
## 112  91        000    no_rejection  91.000  13.0728099   15.822496    3106.3046
## 354 224        365    no_rejection 224.365          NA          NA           NA
## 358 225        365    no_rejection 225.365          NA          NA           NA
## 461  39        090 acute_rejection  39.090   4.9529855   16.631949    7491.4232
## 269 188        090    no_rejection 188.090          NA          NA           NA
## 359  h1        000         healthy  h1.000   0.9435681    4.484811     149.9891
## 538 120        007 acute_rejection 120.007   3.7680105   14.150673    1058.5258
## 107  87        365    no_rejection  87.365   7.6610175    7.384999    1451.9446
## 249 175        090    no_rejection 175.090          NA          NA           NA
##     il18_value il18_bp_value il18_bp_ratio  il18_free il36_b_value creatinine
## 117  167.79567      82.47145     813.83637  165.99438    4.3707304      202.4
## 112 1082.97893     146.00000    2967.06557 1062.56647    8.8875903     1106.6
## 354         NA     165.80000            NA         NA           NA       81.5
## 358         NA     229.00000            NA         NA           NA      156.9
## 461  185.95266    1539.00000      48.33078  154.63839    6.4724064      123.2
## 269         NA    1638.00000            NA         NA           NA      111.9
## 359   97.75158    1946.00000      20.09282   77.82443    0.2677636      102.8
## 538  450.27794    2041.00000      88.24653  354.95408    3.2614558       96.1
## 107  219.21293    2048.00000      42.81502  172.68017    2.4034355      120.0
## 249         NA    2090.00000            NA         NA           NA      207.8
##     egfr
## 117 0.44
## 112 0.08
## 354 1.04
## 358 0.65
## 461 0.88
## 269 0.93
## 359 1.25
## 538 1.21
## 107 0.66
## 249 0.48

4 Cytokine levels changes over time and across groups

Creating a new variable, group_sep, that combines group and time_point into a single variable. Re-defining group and time_point to be factors

Open code
data_long <- data_long %>% 
  mutate(group_sep = factor(interaction(group, time_point)),
         group = factor(group, levels = 
                          c("healthy",
                            "no_rejection", 
                            "acute_rejection")),
         time_point = factor(time_point))

4.1 Il1_a

4.1.1 Mixed model

Open code

## filtering data
model_data <- data_long %>% 
  filter(!is.na(il1_a_value))

## model fit
model_il1_a <-  lmer(log10(il1_a_value) ~ 
                       group_sep +
                       (1|id), data = model_data)

## diagnostic plot of model
plot(model_il1_a)

Open code

## anova result od model
Anova(model_il1_a, type=2, test.statistic='F')
## Analysis of Deviance Table (Type II Wald F tests with Kenward-Roger df)
## 
## Response: log10(il1_a_value)
##                F Df Df.res    Pr(>F)    
## group_sep 15.739  9 417.45 < 2.2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

## model summary
summary(model_il1_a)
## Linear mixed model fit by REML ['lmerMod']
## Formula: log10(il1_a_value) ~ group_sep + (1 | id)
##    Data: model_data
## 
## REML criterion at convergence: 807.8
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.5688 -0.3288  0.0750  0.5766  3.4928 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  id       (Intercept) 0.05345  0.2312  
##  Residual             0.23773  0.4876  
## Number of obs: 500, groups:  id, 186
## 
## Fixed effects:
##                                 Estimate Std. Error t value
## (Intercept)                      0.54459    0.08602   6.331
## group_sephealthy.000            -0.96152    0.11604  -8.286
## group_sepno_rejection.000        0.01385    0.10245   0.135
## group_sepacute_rejection.007    -0.08337    0.10815  -0.771
## group_sepno_rejection.007       -0.09297    0.10245  -0.907
## group_sepacute_rejection.090    -0.02344    0.10975  -0.214
## group_sepno_rejection.090        0.19470    0.12090   1.610
## group_sepacute_rejection.365    -0.11856    0.11488  -1.032
## group_sepno_rejection.365        0.13162    0.12090   1.089
## group_sepacute_rejection.biopsy -0.06165    0.12267  -0.503
## 
## Correlation of Fixed Effects:
##              (Intr) g_.000 g__.000 grp_spc_.007 grp_spn_.007 grp_spc_.090
## grp_sph.000  -0.741                                                      
## grp_sp_.000  -0.840  0.622                                               
## grp_spc_.007 -0.663  0.491  0.557                                        
## grp_spn_.007 -0.840  0.622  0.759   0.557                                
## grp_spc_.090 -0.656  0.486  0.551   0.520        0.551                   
## grp_spn_.090 -0.711  0.527  0.643   0.472        0.643        0.467      
## grp_spc_.365 -0.628  0.466  0.528   0.498        0.528        0.492      
## grp_spn_.365 -0.711  0.527  0.643   0.472        0.643        0.467      
## grp_spct_r.  -0.586  0.434  0.492   0.464        0.492        0.459      
##              grp_spn_.090 grp_spc_.365 grp_spn_.365
## grp_sph.000                                        
## grp_sp_.000                                        
## grp_spc_.007                                       
## grp_spn_.007                                       
## grp_spc_.090                                       
## grp_spn_.090                                       
## grp_spc_.365  0.447                                
## grp_spn_.365  0.583        0.447                   
## grp_spct_r.   0.417        0.435        0.417

4.1.2 Pairwise comparison

4.1.2.1 List of contrasts

List of contrast names and left and right coordinates on the X axis

Open code
contrast <- c(

  ## healthy vs. others
  "healthy vs. no rejection D_0",
  "healthy vs. no rejection D_7",
  "healthy vs. no rejection D_90",
  "healthy vs. no rejection D_365",
  "healthy vs. acute rejection D_0",
  "healthy vs. acute rejection D_7",
  "healthy vs. acute rejection D_90",
  "healthy vs. acute rejection D_365",
  "healthy vs. acute rejection D_biopsy",


  ## between-subjects comparisons
  "no rejection D_0 vs. acute rejection D_0",
  "no rejection D_7 vs. acute rejection D_7",
  "no rejection D_90 vs. acute rejection D_90",
  "no rejection D_365 vs. acute rejection D_365",
  "no rejection D_0 vs. acute rejection D_biopsy",
  "no rejection D_7 vs. acute rejection D_biopsy",
  "no rejection D_90 vs. acute rejection D_biopsy",
  "no rejection D_365 vs. acute rejection D_biopsy",

  ## within-subjects comparisons
  ### no rejection
  "no rejection D_0 vs. no rejection D_7",
  "no rejection D_0 vs. no rejection D_90",
  "no rejection D_0 vs. no rejection D_365",
  "no rejection D_7 vs. no rejection D_90",
  "no rejection D_7 vs. no rejection D_365",
  "no rejection D_90 vs. no rejection D_365",

    ### acute rejection
  "acute rejection D_0 vs. acute rejection D_7",
  "acute rejection D_0 vs. acute rejection D_90",
  "acute rejection D_0 vs. acute rejection D_365",
  "acute rejection D_7 vs. acute rejection D_90",
  "acute rejection D_7 vs. acute rejection D_365",
  "acute rejection D_90 vs. acute rejection D_365",
  "acute rejection D_0 vs. acute rejection D_biopsy",
  "acute rejection D_7 vs. acute rejection D_biopsy",
  "acute rejection D_90 vs. acute rejection D_biopsy",
  "acute rejection D_365 vs. acute rejection D_biopsy"
  )
xcoord_1 <- c(rep(6, 9), seq(0.8, 3.8, 1), seq(0.8, 3.8, 1),
              rep(0.8, 3), rep(1.8, 2), 2.8,
              rep(1.2, 3), rep(2.2, 2), 3.2,
              seq(1.2, 4.2, 1))

xcoord_2 <- c(seq(0.8, 3.8, 1), seq(1.2, 4.2, 1),
              5, seq(1.2, 4.2, 1), rep(5, 4),
              seq(1.8, 3.8, 1), 2.8, 3.8, 3.8,
              2.2, 3.2, 4.2, 3.2, 4.2, 4.2,
              rep(5, 4))

anot_coord <- (xcoord_1+xcoord_2)/2

pair_table <- data.frame(contrast, xcoord_1, xcoord_2,
                         anot_coord)

pair_table <- pair_table %>% 
  mutate(term1 = if_else(xcoord_1 == 6, 'healthy.000', 'other')) %>% 
  mutate(term1 = if_else(xcoord_1 == 0.8, 'no_rejection.000', term1)) %>% 
  mutate(term1 = if_else(xcoord_1 == 1.8, 'no_rejection.007', term1)) %>% 
  mutate(term1 = if_else(xcoord_1 == 2.8, 'no_rejection.090', term1)) %>% 
  mutate(term1 = if_else(xcoord_1 == 3.8, 'no_rejection.365', term1)) %>% 
  mutate(term1 = if_else(xcoord_1 == 5, 'acute_rejection.biopsy', term1)) %>% 
  mutate(term1 = if_else(xcoord_1 == 1.2, 'acute_rejection.000', term1)) %>% 
  mutate(term1 = if_else(xcoord_1 == 2.2, 'acute_rejection.007', term1)) %>%
  mutate(term1 = if_else(xcoord_1 == 3.2, 'acute_rejection.090', term1)) %>%
  mutate(term1 = if_else(xcoord_1 == 4.2, 'acute_rejection.365', term1)) %>%
  mutate(term2 = if_else(xcoord_2 == 6, 'healthy.000', 'other')) %>% 
  mutate(term2 = if_else(xcoord_2 == 0.8, 'no_rejection.000', term2)) %>% 
  mutate(term2 = if_else(xcoord_2 == 1.8, 'no_rejection.007', term2)) %>% 
  mutate(term2 = if_else(xcoord_2 == 2.8, 'no_rejection.090', term2)) %>% 
  mutate(term2 = if_else(xcoord_2 == 3.8, 'no_rejection.365', term2)) %>% 
  mutate(term2 = if_else(xcoord_2 == 5, 'acute_rejection.biopsy', term2)) %>% 
  mutate(term2 = if_else(xcoord_2 == 1.2, 'acute_rejection.000', term2)) %>% 
  mutate(term2 = if_else(xcoord_2 == 2.2, 'acute_rejection.007', term2)) %>%
  mutate(term2 = if_else(xcoord_2 == 3.2, 'acute_rejection.090', term2)) %>%
  mutate(term2 = if_else(xcoord_2 == 4.2, 'acute_rejection.365', term2))

  
  pair_table$p <- NA

4.1.2.2 Between-subjects comparisons

Open code
set.seed(16)
for (i in 1:17){
  dat_pair <- model_data %>% 
    filter(group_sep == paste(pair_table$term1[i])|
           group_sep == paste(pair_table$term2[i]))
  
  g1 <- dat_pair %>% filter(group_sep == paste(pair_table$term1[i]))
  g2 <- dat_pair %>% filter(group_sep == paste(pair_table$term2[i]))
  
  pair_table$p[i] <- wilcox.test(g1$il1_a_value, g2$il1_a_value, paired=FALSE)$p.value
}

4.1.2.3 Within-subject comparisons

Open code
set.seed(16)
for (i in 18:33){
  dat_pair <- model_data %>% 
    filter(group_sep == paste(pair_table$term1[i]) |
           group_sep == paste(pair_table$term2[i])) %>% 
    select(id, group_sep, il1_a_value) %>% 
    pivot_wider(names_from = group_sep, values_from = il1_a_value) %>% 
    filter(complete.cases(.)) %>% data.frame()
  
  g1 <- dat_pair[,2]
  g2 <- dat_pair[,3]
  
  pair_table$p[i] <- wilcox.test(c(g1), c(g2), paired=TRUE)$p.value
}

pair_table <- pair_table[-c(14:15, 19:20, 22, 25:26, 28, 30:33),] %>% data.frame()
pair_table$cole <- c(rep("black", 15), rep("blue3", 3), rep("red4", 3))
pair_table$fdr <- p.adjust(pair_table$p, method = 'BH')

4.1.2.4 Resulting table

Open code
## the whole `pair table`
pair_table
##                                           contrast xcoord_1 xcoord_2 anot_coord
## 1                     healthy vs. no rejection D_0      6.0      0.8        3.4
## 2                     healthy vs. no rejection D_7      6.0      1.8        3.9
## 3                    healthy vs. no rejection D_90      6.0      2.8        4.4
## 4                   healthy vs. no rejection D_365      6.0      3.8        4.9
## 5                  healthy vs. acute rejection D_0      6.0      1.2        3.6
## 6                  healthy vs. acute rejection D_7      6.0      2.2        4.1
## 7                 healthy vs. acute rejection D_90      6.0      3.2        4.6
## 8                healthy vs. acute rejection D_365      6.0      4.2        5.1
## 9             healthy vs. acute rejection D_biopsy      6.0      5.0        5.5
## 10        no rejection D_0 vs. acute rejection D_0      0.8      1.2        1.0
## 11        no rejection D_7 vs. acute rejection D_7      1.8      2.2        2.0
## 12      no rejection D_90 vs. acute rejection D_90      2.8      3.2        3.0
## 13    no rejection D_365 vs. acute rejection D_365      3.8      4.2        4.0
## 16  no rejection D_90 vs. acute rejection D_biopsy      2.8      5.0        3.9
## 17 no rejection D_365 vs. acute rejection D_biopsy      3.8      5.0        4.4
## 18           no rejection D_0 vs. no rejection D_7      0.8      1.8        1.3
## 21          no rejection D_7 vs. no rejection D_90      1.8      2.8        2.3
## 23        no rejection D_90 vs. no rejection D_365      2.8      3.8        3.3
## 24     acute rejection D_0 vs. acute rejection D_7      1.2      2.2        1.7
## 27    acute rejection D_7 vs. acute rejection D_90      2.2      3.2        2.7
## 29  acute rejection D_90 vs. acute rejection D_365      3.2      4.2        3.7
##                  term1                  term2            p  cole          fdr
## 1          healthy.000       no_rejection.000 6.973501e-11 black 2.928870e-10
## 2          healthy.000       no_rejection.007 5.227359e-11 black 2.744363e-10
## 3          healthy.000       no_rejection.090 1.475037e-13 black 3.097579e-12
## 4          healthy.000       no_rejection.365 7.054097e-13 black 7.406802e-12
## 5          healthy.000    acute_rejection.000 5.467856e-10 black 1.913750e-09
## 6          healthy.000    acute_rejection.007 2.952645e-09 black 7.750693e-09
## 7          healthy.000    acute_rejection.090 3.797214e-11 black 2.658050e-10
## 8          healthy.000    acute_rejection.365 2.847456e-09 black 7.750693e-09
## 9          healthy.000 acute_rejection.biopsy 4.447710e-09 black 1.037799e-08
## 10    no_rejection.000    acute_rejection.000 3.608654e-01 black 4.300071e-01
## 11    no_rejection.007    acute_rejection.007 3.455284e-01 black 4.300071e-01
## 12    no_rejection.090    acute_rejection.090 6.924033e-06 black 1.321861e-05
## 13    no_rejection.365    acute_rejection.365 2.968675e-06 black 6.234218e-06
## 16    no_rejection.090 acute_rejection.biopsy 1.026038e-04 black 1.795567e-04
## 17    no_rejection.365 acute_rejection.biopsy 7.185841e-04 black 1.160790e-03
## 18    no_rejection.000       no_rejection.007 7.523005e-03 blue3 1.128451e-02
## 21    no_rejection.007       no_rejection.090 6.940287e-01 blue3 7.670843e-01
## 23    no_rejection.090       no_rejection.365 3.685775e-01 blue3 4.300071e-01
## 24 acute_rejection.000    acute_rejection.007 8.076073e-01  red4 8.076073e-01
## 27 acute_rejection.007    acute_rejection.090 7.446044e-01  red4 7.818346e-01
## 29 acute_rejection.090    acute_rejection.365 1.794364e-01  red4 2.512110e-01

## only significant differences
pair_table %>% 
  filter(p<0.05) %>% 
  select(contrast, p, fdr) %>% 
  mutate(star = if_else(p<0.05, '*', '')) %>% 
  mutate(star = if_else(p<0.01, '**', star)) %>% 
  mutate(star = if_else(p<0.001, '***', star)) %>%        
  data.frame()
##                                           contrast            p          fdr
## 1                     healthy vs. no rejection D_0 6.973501e-11 2.928870e-10
## 2                     healthy vs. no rejection D_7 5.227359e-11 2.744363e-10
## 3                    healthy vs. no rejection D_90 1.475037e-13 3.097579e-12
## 4                   healthy vs. no rejection D_365 7.054097e-13 7.406802e-12
## 5                  healthy vs. acute rejection D_0 5.467856e-10 1.913750e-09
## 6                  healthy vs. acute rejection D_7 2.952645e-09 7.750693e-09
## 7                 healthy vs. acute rejection D_90 3.797214e-11 2.658050e-10
## 8                healthy vs. acute rejection D_365 2.847456e-09 7.750693e-09
## 9             healthy vs. acute rejection D_biopsy 4.447710e-09 1.037799e-08
## 10      no rejection D_90 vs. acute rejection D_90 6.924033e-06 1.321861e-05
## 11    no rejection D_365 vs. acute rejection D_365 2.968675e-06 6.234218e-06
## 12  no rejection D_90 vs. acute rejection D_biopsy 1.026038e-04 1.795567e-04
## 13 no rejection D_365 vs. acute rejection D_biopsy 7.185841e-04 1.160790e-03
## 14           no rejection D_0 vs. no rejection D_7 7.523005e-03 1.128451e-02
##    star
## 1   ***
## 2   ***
## 3   ***
## 4   ***
## 5   ***
## 6   ***
## 7   ***
## 8   ***
## 9   ***
## 10  ***
## 11  ***
## 12  ***
## 13  ***
## 14   **


pair_rest <- pair_table %>% 
  filter(p<0.05,
         term1 != 'healthy.000') %>% 
  mutate(star = if_else(p<0.05, '*', '')) %>% 
  mutate(star = if_else(p<0.01, '**', star)) %>% 
  mutate(star = if_else(p<0.001, '***', star)) %>%        
  data.frame()

4.1.3 Visualization

Open code

## plot
plotos <- data_long %>% 
  filter(!is.na(il1_a_value)) %>% 
  mutate(group = factor(group, levels = 
                          c("no_rejection", 
                            "acute_rejection",
                            "healthy")),
         time_point = factor(time_point)) %>% 
  mutate(time_point = if_else(group == 'healthy', 'healthy', time_point)) %>% 
  mutate(group_sep = interaction(group, time_point)) %>% 
  
## plotting
  ggplot(aes(x=time_point, y=il1_a_value)) +
  geom_boxplot(aes(fill=group, group = group_sep), outlier.shape = NA, 
               size=0.5,position = position_dodge(width = 0.84), color='black') +
  labs(x = "Time post TX", y = expression("IL-1" * alpha * " (pg/ml)")) +
  scale_x_discrete(labels = c("Before TX", "7 days", "3 months", "365 days",
                              "Biopsy", "Healthy")) +
  theme(axis.text = element_text(size = 11),
        axis.title = element_text(size = 12),
        legend.text = element_text(size = 11),
        legend.title = element_text(size = 12)) +
  scale_fill_manual(values = c("no_rejection" = "skyblue2",
                               "acute_rejection" = "coral",
                               "healthy" = "darkolivegreen3"), 
                    labels = c("no rejection", "acute rejection", "healthy")) +
    coord_cartesian(ylim = c(0, 30)) +
  annotate("text", x = 6, y = 5, label = "#", size = 7) 

pair_rest$y <- c(12, 11, 16, 13,30)

plotos <- plotos + geom_segment(data = pair_rest, 
                                aes(x = xcoord_1, xend = xcoord_2, y = y, yend = y),
                                color = pair_rest$cole,
                                linetype = "solid", size = 0.4) 
plot_il1_a <- plotos + annotate("text", x = pair_rest$anot_coord, y = pair_rest$y+0.5, 
                            label = pair_rest$star, size = 7, color=pair_rest$cole) 
plot_il1_a

Open code

plotac <- 'plot_il1_a'

path = paste0('gitignore/figures/',plotac, '.eps')
if(file.exists(path) == FALSE){
  ggsave(path, 
         plot = get(plotac), width = 7.5, height = 5.6, units = "in")
}

4.2 Il1_b

4.2.1 Mixed model

Open code

## filtering data
model_data <- data_long %>% 
  filter(!is.na(il1_b_value))

## model fit
model_il1_b <-  lmer(log10(il1_b_value) ~ 
                       group_sep +
                       (1|id), data = model_data)

## diagnostic plot of model
plot(model_il1_b)

Open code

## anova result od model
Anova(model_il1_b, type=2, test.statistic='F')
## Analysis of Deviance Table (Type II Wald F tests with Kenward-Roger df)
## 
## Response: log10(il1_b_value)
##               F Df Df.res    Pr(>F)    
## group_sep 83.17  9 417.24 < 2.2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

## model summary
summary(model_il1_b)
## Linear mixed model fit by REML ['lmerMod']
## Formula: log10(il1_b_value) ~ group_sep + (1 | id)
##    Data: model_data
## 
## REML criterion at convergence: -509.1
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -6.2908 -0.5140 -0.0895  0.2629  7.1938 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  id       (Intercept) 0.003725 0.06103 
##  Residual             0.016117 0.12695 
## Number of obs: 500, groups:  id, 186
## 
## Fixed effects:
##                                 Estimate Std. Error t value
## (Intercept)                      1.16016    0.02245  51.675
## group_sephealthy.000            -0.59874    0.03029 -19.768
## group_sepno_rejection.000        0.04741    0.02674   1.773
## group_sepacute_rejection.007    -0.05044    0.02816  -1.791
## group_sepno_rejection.007       -0.01361    0.02674  -0.509
## group_sepacute_rejection.090    -0.04086    0.02858  -1.430
## group_sepno_rejection.090       -0.07554    0.03155  -2.395
## group_sepacute_rejection.365    -0.05930    0.02992  -1.982
## group_sepno_rejection.365       -0.09149    0.03155  -2.900
## group_sepacute_rejection.biopsy -0.04640    0.03195  -1.453
## 
## Correlation of Fixed Effects:
##              (Intr) g_.000 g__.000 grp_spc_.007 grp_spn_.007 grp_spc_.090
## grp_sph.000  -0.741                                                      
## grp_sp_.000  -0.840  0.622                                               
## grp_spc_.007 -0.661  0.490  0.555                                        
## grp_spn_.007 -0.840  0.622  0.760   0.555                                
## grp_spc_.090 -0.654  0.485  0.549   0.520        0.549                   
## grp_spn_.090 -0.712  0.528  0.644   0.471        0.644        0.466      
## grp_spc_.365 -0.627  0.465  0.526   0.498        0.526        0.492      
## grp_spn_.365 -0.712  0.528  0.644   0.471        0.644        0.466      
## grp_spct_r.  -0.584  0.433  0.490   0.464        0.490        0.459      
##              grp_spn_.090 grp_spc_.365 grp_spn_.365
## grp_sph.000                                        
## grp_sp_.000                                        
## grp_spc_.007                                       
## grp_spn_.007                                       
## grp_spc_.090                                       
## grp_spn_.090                                       
## grp_spc_.365  0.446                                
## grp_spn_.365  0.585        0.446                   
## grp_spct_r.   0.416        0.435        0.416

4.2.2 Pairwise comparison

4.2.2.1 List of contrasts

List of contrast names and left and right coordinates on the X axis

Open code
contrast <- c(

  ## healthy vs. others
  "healthy vs. no rejection D_0",
  "healthy vs. no rejection D_7",
  "healthy vs. no rejection D_90",
  "healthy vs. no rejection D_365",
  "healthy vs. acute rejection D_0",
  "healthy vs. acute rejection D_7",
  "healthy vs. acute rejection D_90",
  "healthy vs. acute rejection D_365",
  "healthy vs. acute rejection D_biopsy",


  ## between-subjects comparisons
  "no rejection D_0 vs. acute rejection D_0",
  "no rejection D_7 vs. acute rejection D_7",
  "no rejection D_90 vs. acute rejection D_90",
  "no rejection D_365 vs. acute rejection D_365",
  "no rejection D_0 vs. acute rejection D_biopsy",
  "no rejection D_7 vs. acute rejection D_biopsy",
  "no rejection D_90 vs. acute rejection D_biopsy",
  "no rejection D_365 vs. acute rejection D_biopsy",

  ## within-subjects comparisons
  ### no rejection
  "no rejection D_0 vs. no rejection D_7",
  "no rejection D_0 vs. no rejection D_90",
  "no rejection D_0 vs. no rejection D_365",
  "no rejection D_7 vs. no rejection D_90",
  "no rejection D_7 vs. no rejection D_365",
  "no rejection D_90 vs. no rejection D_365",

    ### acute rejection
  "acute rejection D_0 vs. acute rejection D_7",
  "acute rejection D_0 vs. acute rejection D_90",
  "acute rejection D_0 vs. acute rejection D_365",
  "acute rejection D_7 vs. acute rejection D_90",
  "acute rejection D_7 vs. acute rejection D_365",
  "acute rejection D_90 vs. acute rejection D_365",
  "acute rejection D_0 vs. acute rejection D_biopsy",
  "acute rejection D_7 vs. acute rejection D_biopsy",
  "acute rejection D_90 vs. acute rejection D_biopsy",
  "acute rejection D_365 vs. acute rejection D_biopsy"
  )
xcoord_1 <- c(rep(6, 9), seq(0.8, 3.8, 1), seq(0.8, 3.8, 1),
              rep(0.8, 3), rep(1.8, 2), 2.8,
              rep(1.2, 3), rep(2.2, 2), 3.2,
              seq(1.2, 4.2, 1))

xcoord_2 <- c(seq(0.8, 3.8, 1), seq(1.2, 4.2, 1),
              5, seq(1.2, 4.2, 1), rep(5, 4),
              seq(1.8, 3.8, 1), 2.8, 3.8, 3.8,
              2.2, 3.2, 4.2, 3.2, 4.2, 4.2,
              rep(5, 4))

anot_coord <- (xcoord_1+xcoord_2)/2

pair_table <- data.frame(contrast, xcoord_1, xcoord_2,
                         anot_coord)

pair_table <- pair_table %>% 
  mutate(term1 = if_else(xcoord_1 == 6, 'healthy.000', 'other')) %>% 
  mutate(term1 = if_else(xcoord_1 == 0.8, 'no_rejection.000', term1)) %>% 
  mutate(term1 = if_else(xcoord_1 == 1.8, 'no_rejection.007', term1)) %>% 
  mutate(term1 = if_else(xcoord_1 == 2.8, 'no_rejection.090', term1)) %>% 
  mutate(term1 = if_else(xcoord_1 == 3.8, 'no_rejection.365', term1)) %>% 
  mutate(term1 = if_else(xcoord_1 == 5, 'acute_rejection.biopsy', term1)) %>% 
  mutate(term1 = if_else(xcoord_1 == 1.2, 'acute_rejection.000', term1)) %>% 
  mutate(term1 = if_else(xcoord_1 == 2.2, 'acute_rejection.007', term1)) %>%
  mutate(term1 = if_else(xcoord_1 == 3.2, 'acute_rejection.090', term1)) %>%
  mutate(term1 = if_else(xcoord_1 == 4.2, 'acute_rejection.365', term1)) %>%
  mutate(term2 = if_else(xcoord_2 == 6, 'healthy.000', 'other')) %>% 
  mutate(term2 = if_else(xcoord_2 == 0.8, 'no_rejection.000', term2)) %>% 
  mutate(term2 = if_else(xcoord_2 == 1.8, 'no_rejection.007', term2)) %>% 
  mutate(term2 = if_else(xcoord_2 == 2.8, 'no_rejection.090', term2)) %>% 
  mutate(term2 = if_else(xcoord_2 == 3.8, 'no_rejection.365', term2)) %>% 
  mutate(term2 = if_else(xcoord_2 == 5, 'acute_rejection.biopsy', term2)) %>% 
  mutate(term2 = if_else(xcoord_2 == 1.2, 'acute_rejection.000', term2)) %>% 
  mutate(term2 = if_else(xcoord_2 == 2.2, 'acute_rejection.007', term2)) %>%
  mutate(term2 = if_else(xcoord_2 == 3.2, 'acute_rejection.090', term2)) %>%
  mutate(term2 = if_else(xcoord_2 == 4.2, 'acute_rejection.365', term2))
  
  pair_table$p <- NA

4.2.2.2 Between-subjects comparisons

Open code
set.seed(16)
for (i in 1:17){
  dat_pair <- model_data %>% 
    filter(group_sep == paste(pair_table$term1[i])|
           group_sep == paste(pair_table$term2[i]))
  
  g1 <- dat_pair %>% filter(group_sep == paste(pair_table$term1[i]))
  g2 <- dat_pair %>% filter(group_sep == paste(pair_table$term2[i]))
  
  pair_table$p[i] <- wilcox.test(g1$il1_b_value, g2$il1_b_value, paired=FALSE)$p.value
}

4.2.2.3 Within-subject comparisons

Open code
set.seed(16)
for (i in 18:33){
  dat_pair <- model_data %>% 
    filter(group_sep == paste(pair_table$term1[i]) |
           group_sep == paste(pair_table$term2[i])) %>% 
    select(id, group_sep, il1_b_value) %>% 
    pivot_wider(names_from = group_sep, values_from = il1_b_value) %>% 
    filter(complete.cases(.)) %>% data.frame()
  
  g1 <- dat_pair[,2]
  g2 <- dat_pair[,3]
  
  pair_table$p[i] <- wilcox.test(c(g1), c(g2), paired=TRUE)$p.value
}


pair_table <- pair_table[-c(14:15, 19:20, 22, 25:26, 28, 30:33),]
pair_table$cole <- c(rep("black", 15), rep("blue3", 3), rep("red4", 3))
pair_table$fdr <- p.adjust(pair_table$p, method = 'BH')

4.2.2.4 Resulting table

Open code
## the whole `pair table`
pair_table
##                                           contrast xcoord_1 xcoord_2 anot_coord
## 1                     healthy vs. no rejection D_0      6.0      0.8        3.4
## 2                     healthy vs. no rejection D_7      6.0      1.8        3.9
## 3                    healthy vs. no rejection D_90      6.0      2.8        4.4
## 4                   healthy vs. no rejection D_365      6.0      3.8        4.9
## 5                  healthy vs. acute rejection D_0      6.0      1.2        3.6
## 6                  healthy vs. acute rejection D_7      6.0      2.2        4.1
## 7                 healthy vs. acute rejection D_90      6.0      3.2        4.6
## 8                healthy vs. acute rejection D_365      6.0      4.2        5.1
## 9             healthy vs. acute rejection D_biopsy      6.0      5.0        5.5
## 10        no rejection D_0 vs. acute rejection D_0      0.8      1.2        1.0
## 11        no rejection D_7 vs. acute rejection D_7      1.8      2.2        2.0
## 12      no rejection D_90 vs. acute rejection D_90      2.8      3.2        3.0
## 13    no rejection D_365 vs. acute rejection D_365      3.8      4.2        4.0
## 16  no rejection D_90 vs. acute rejection D_biopsy      2.8      5.0        3.9
## 17 no rejection D_365 vs. acute rejection D_biopsy      3.8      5.0        4.4
## 18           no rejection D_0 vs. no rejection D_7      0.8      1.8        1.3
## 21          no rejection D_7 vs. no rejection D_90      1.8      2.8        2.3
## 23        no rejection D_90 vs. no rejection D_365      2.8      3.8        3.3
## 24     acute rejection D_0 vs. acute rejection D_7      1.2      2.2        1.7
## 27    acute rejection D_7 vs. acute rejection D_90      2.2      3.2        2.7
## 29  acute rejection D_90 vs. acute rejection D_365      3.2      4.2        3.7
##                  term1                  term2            p  cole          fdr
## 1          healthy.000       no_rejection.000 1.007494e-20 black 1.100496e-19
## 2          healthy.000       no_rejection.007 1.048092e-20 black 1.100496e-19
## 3          healthy.000       no_rejection.090 1.941165e-14 black 6.224985e-14
## 4          healthy.000       no_rejection.365 2.074995e-14 black 6.224985e-14
## 5          healthy.000    acute_rejection.000 1.954387e-14 black 6.224985e-14
## 6          healthy.000    acute_rejection.007 3.839545e-15 black 2.687682e-14
## 7          healthy.000    acute_rejection.090 8.457201e-15 black 4.440030e-14
## 8          healthy.000    acute_rejection.365 1.162541e-13 black 3.051669e-13
## 9          healthy.000 acute_rejection.biopsy 4.140081e-12 black 9.660189e-12
## 10    no_rejection.000    acute_rejection.000 1.656273e-01 black 2.045985e-01
## 11    no_rejection.007    acute_rejection.007 3.029547e-02 black 4.241366e-02
## 12    no_rejection.090    acute_rejection.090 1.269805e-01 black 1.666619e-01
## 13    no_rejection.365    acute_rejection.365 1.059940e-02 black 1.712211e-02
## 16    no_rejection.090 acute_rejection.biopsy 2.524270e-01 black 2.944981e-01
## 17    no_rejection.365 acute_rejection.biopsy 2.029089e-02 black 3.043634e-02
## 18    no_rejection.000       no_rejection.007 8.577426e-05 blue3 1.801260e-04
## 21    no_rejection.007       no_rejection.090 1.573119e-03 blue3 3.003227e-03
## 23    no_rejection.090       no_rejection.365 5.391972e-01 blue3 5.391972e-01
## 24 acute_rejection.000    acute_rejection.007 5.187312e-03  red4 9.077796e-03
## 27 acute_rejection.007    acute_rejection.090 5.013747e-01  red4 5.264435e-01
## 29 acute_rejection.090    acute_rejection.365 4.890153e-01  red4 5.264435e-01

## only significant differences
pair_table %>% filter(p<0.05) %>% data.frame()
##                                           contrast xcoord_1 xcoord_2 anot_coord
## 1                     healthy vs. no rejection D_0      6.0      0.8        3.4
## 2                     healthy vs. no rejection D_7      6.0      1.8        3.9
## 3                    healthy vs. no rejection D_90      6.0      2.8        4.4
## 4                   healthy vs. no rejection D_365      6.0      3.8        4.9
## 5                  healthy vs. acute rejection D_0      6.0      1.2        3.6
## 6                  healthy vs. acute rejection D_7      6.0      2.2        4.1
## 7                 healthy vs. acute rejection D_90      6.0      3.2        4.6
## 8                healthy vs. acute rejection D_365      6.0      4.2        5.1
## 9             healthy vs. acute rejection D_biopsy      6.0      5.0        5.5
## 10        no rejection D_7 vs. acute rejection D_7      1.8      2.2        2.0
## 11    no rejection D_365 vs. acute rejection D_365      3.8      4.2        4.0
## 12 no rejection D_365 vs. acute rejection D_biopsy      3.8      5.0        4.4
## 13           no rejection D_0 vs. no rejection D_7      0.8      1.8        1.3
## 14          no rejection D_7 vs. no rejection D_90      1.8      2.8        2.3
## 15     acute rejection D_0 vs. acute rejection D_7      1.2      2.2        1.7
##                  term1                  term2            p  cole          fdr
## 1          healthy.000       no_rejection.000 1.007494e-20 black 1.100496e-19
## 2          healthy.000       no_rejection.007 1.048092e-20 black 1.100496e-19
## 3          healthy.000       no_rejection.090 1.941165e-14 black 6.224985e-14
## 4          healthy.000       no_rejection.365 2.074995e-14 black 6.224985e-14
## 5          healthy.000    acute_rejection.000 1.954387e-14 black 6.224985e-14
## 6          healthy.000    acute_rejection.007 3.839545e-15 black 2.687682e-14
## 7          healthy.000    acute_rejection.090 8.457201e-15 black 4.440030e-14
## 8          healthy.000    acute_rejection.365 1.162541e-13 black 3.051669e-13
## 9          healthy.000 acute_rejection.biopsy 4.140081e-12 black 9.660189e-12
## 10    no_rejection.007    acute_rejection.007 3.029547e-02 black 4.241366e-02
## 11    no_rejection.365    acute_rejection.365 1.059940e-02 black 1.712211e-02
## 12    no_rejection.365 acute_rejection.biopsy 2.029089e-02 black 3.043634e-02
## 13    no_rejection.000       no_rejection.007 8.577426e-05 blue3 1.801260e-04
## 14    no_rejection.007       no_rejection.090 1.573119e-03 blue3 3.003227e-03
## 15 acute_rejection.000    acute_rejection.007 5.187312e-03  red4 9.077796e-03

pair_rest <- pair_table %>% 
  filter(p<0.05,
         term1 != 'healthy.000') %>% 
  mutate(star = if_else(p<0.05, '*', '')) %>% 
  mutate(star = if_else(p<0.01, '**', star)) %>% 
  mutate(star = if_else(p<0.001, '***', star)) %>%        
  data.frame()

4.2.3 Visualization

Open code

## plot
plotos <- data_long %>% 
  filter(!is.na(il1_b_value)) %>% 
  mutate(group = factor(group, levels = 
                          c("no_rejection", 
                            "acute_rejection",
                            "healthy")),
         time_point = factor(time_point)) %>% 
  mutate(time_point = if_else(group == 'healthy', 'healthy', time_point)) %>% 
  mutate(group_sep = interaction(group, time_point)) %>% 
  
## plotting
  ggplot(aes(x=time_point, y=il1_b_value)) +
  geom_boxplot(aes(fill=group, group = group_sep), outlier.shape = NA, 
               size=0.5,position = position_dodge(width = 0.84), color='black') +
  labs(x = "Time post TX", y = expression("IL-1" * beta * " (pg/ml)")) +
  scale_x_discrete(labels = c("Before TX", "7 days", "3 months", "365 days",
                              "Biopsy", "Healthy")) +
  theme(axis.text = element_text(size = 11),
        axis.title = element_text(size = 12),
        legend.text = element_text(size = 11),
        legend.title = element_text(size = 12)) +
  scale_fill_manual(values = c("no_rejection" = "skyblue2",
                               "acute_rejection" = "coral",
                               "healthy" = "darkolivegreen3"), 
                    labels = c("no rejection", "acute rejection", "healthy")) +
  coord_cartesian(ylim = c(0, 28)) +
  annotate("text", x = 6, y = 10, label = "#", size = 7) 

pair_rest$y <- c(19, 17, 19, 26.5, 21, 25)

plotos <- plotos + geom_segment(data = pair_rest, 
                                aes(x = xcoord_1, xend = xcoord_2, y = y, yend = y),
                                color = pair_rest$cole,
                                linetype = "solid", size = 0.4) 
plot_il1_b <- plotos + annotate("text", x = pair_rest$anot_coord, y = pair_rest$y+0.5, 
                            label = pair_rest$star, size = 7, color=pair_rest$cole) 
plot_il1_b

Open code

plotac <- 'plot_il1_b'

path = paste0('gitignore/figures/',plotac, '.eps')
if(file.exists(path) == FALSE){
  ggsave(path, 
         plot = get(plotac), width = 7.5, height = 5.6, units = "in")
}

4.3 il1_ra

4.3.1 Mixed model

Open code

## filtering data
model_data <- data_long %>% 
  filter(!is.na(il1_ra_value))

## model fit
model_il1_ra <-  lmer(log10(il1_ra_value) ~ 
                       group_sep +
                       (1|id), data = model_data)

## diagnostic plot of model
plot(model_il1_ra)

Open code

## anova result od model
Anova(model_il1_ra, type=2, test.statistic='F')
## Analysis of Deviance Table (Type II Wald F tests with Kenward-Roger df)
## 
## Response: log10(il1_ra_value)
##                F Df Df.res    Pr(>F)    
## group_sep 17.915  9 414.32 < 2.2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

## model summary
summary(model_il1_ra)
## Linear mixed model fit by REML ['lmerMod']
## Formula: log10(il1_ra_value) ~ group_sep + (1 | id)
##    Data: model_data
## 
## REML criterion at convergence: 325.3
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -6.3924 -0.5919 -0.1109  0.4126  3.4509 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  id       (Intercept) 0.02780  0.1667  
##  Residual             0.08388  0.2896  
## Number of obs: 500, groups:  id, 186
## 
## Fixed effects:
##                                 Estimate Std. Error t value
## (Intercept)                      3.17638    0.05311  59.805
## group_sephealthy.000            -0.57937    0.07175  -8.075
## group_sepno_rejection.000        0.11718    0.06332   1.851
## group_sepacute_rejection.007    -0.12171    0.06428  -1.893
## group_sepno_rejection.007       -0.06739    0.06332  -1.064
## group_sepacute_rejection.090    -0.11194    0.06528  -1.715
## group_sepno_rejection.090       -0.06636    0.07428  -0.893
## group_sepacute_rejection.365    -0.28796    0.06841  -4.209
## group_sepno_rejection.365       -0.17831    0.07428  -2.400
## group_sepacute_rejection.biopsy -0.17195    0.07310  -2.352
## 
## Correlation of Fixed Effects:
##              (Intr) g_.000 g__.000 grp_spc_.007 grp_spn_.007 grp_spc_.090
## grp_sph.000  -0.740                                                      
## grp_sp_.000  -0.839  0.621                                               
## grp_spc_.007 -0.639  0.473  0.536                                        
## grp_spn_.007 -0.839  0.621  0.777   0.536                                
## grp_spc_.090 -0.632  0.468  0.530   0.520        0.530                   
## grp_spn_.090 -0.715  0.529  0.663   0.457        0.663        0.452      
## grp_spc_.365 -0.605  0.448  0.508   0.498        0.508        0.492      
## grp_spn_.365 -0.715  0.529  0.663   0.457        0.663        0.452      
## grp_spct_r.  -0.563  0.417  0.472   0.463        0.472        0.459      
##              grp_spn_.090 grp_spc_.365 grp_spn_.365
## grp_sph.000                                        
## grp_sp_.000                                        
## grp_spc_.007                                       
## grp_spn_.007                                       
## grp_spc_.090                                       
## grp_spn_.090                                       
## grp_spc_.365  0.433                                
## grp_spn_.365  0.610        0.433                   
## grp_spct_r.   0.403        0.433        0.403

4.3.2 Pairwise comparison

4.3.2.1 List of contrasts

List of contrast names and left and right coordinates on the X axis

Open code
contrast <- c(

  ## healthy vs. others
  "healthy vs. no rejection D_0",
  "healthy vs. no rejection D_7",
  "healthy vs. no rejection D_90",
  "healthy vs. no rejection D_365",
  "healthy vs. acute rejection D_0",
  "healthy vs. acute rejection D_7",
  "healthy vs. acute rejection D_90",
  "healthy vs. acute rejection D_365",
  "healthy vs. acute rejection D_biopsy",


  ## between-subjects comparisons
  "no rejection D_0 vs. acute rejection D_0",
  "no rejection D_7 vs. acute rejection D_7",
  "no rejection D_90 vs. acute rejection D_90",
  "no rejection D_365 vs. acute rejection D_365",
  "no rejection D_0 vs. acute rejection D_biopsy",
  "no rejection D_7 vs. acute rejection D_biopsy",
  "no rejection D_90 vs. acute rejection D_biopsy",
  "no rejection D_365 vs. acute rejection D_biopsy",

  ## within-subjects comparisons
  ### no rejection
  "no rejection D_0 vs. no rejection D_7",
  "no rejection D_0 vs. no rejection D_90",
  "no rejection D_0 vs. no rejection D_365",
  "no rejection D_7 vs. no rejection D_90",
  "no rejection D_7 vs. no rejection D_365",
  "no rejection D_90 vs. no rejection D_365",

    ### acute rejection
  "acute rejection D_0 vs. acute rejection D_7",
  "acute rejection D_0 vs. acute rejection D_90",
  "acute rejection D_0 vs. acute rejection D_365",
  "acute rejection D_7 vs. acute rejection D_90",
  "acute rejection D_7 vs. acute rejection D_365",
  "acute rejection D_90 vs. acute rejection D_365",
  "acute rejection D_0 vs. acute rejection D_biopsy",
  "acute rejection D_7 vs. acute rejection D_biopsy",
  "acute rejection D_90 vs. acute rejection D_biopsy",
  "acute rejection D_365 vs. acute rejection D_biopsy"
  )
xcoord_1 <- c(rep(6, 9), seq(0.8, 3.8, 1), seq(0.8, 3.8, 1),
              rep(0.8, 3), rep(1.8, 2), 2.8,
              rep(1.2, 3), rep(2.2, 2), 3.2,
              seq(1.2, 4.2, 1))

xcoord_2 <- c(seq(0.8, 3.8, 1), seq(1.2, 4.2, 1),
              5, seq(1.2, 4.2, 1), rep(5, 4),
              seq(1.8, 3.8, 1), 2.8, 3.8, 3.8,
              2.2, 3.2, 4.2, 3.2, 4.2, 4.2,
              rep(5, 4))

anot_coord <- (xcoord_1+xcoord_2)/2

pair_table <- data.frame(contrast, xcoord_1, xcoord_2,
                         anot_coord)

pair_table <- pair_table %>% 
  mutate(term1 = if_else(xcoord_1 == 6, 'healthy.000', 'other')) %>% 
  mutate(term1 = if_else(xcoord_1 == 0.8, 'no_rejection.000', term1)) %>% 
  mutate(term1 = if_else(xcoord_1 == 1.8, 'no_rejection.007', term1)) %>% 
  mutate(term1 = if_else(xcoord_1 == 2.8, 'no_rejection.090', term1)) %>% 
  mutate(term1 = if_else(xcoord_1 == 3.8, 'no_rejection.365', term1)) %>% 
  mutate(term1 = if_else(xcoord_1 == 5, 'acute_rejection.biopsy', term1)) %>% 
  mutate(term1 = if_else(xcoord_1 == 1.2, 'acute_rejection.000', term1)) %>% 
  mutate(term1 = if_else(xcoord_1 == 2.2, 'acute_rejection.007', term1)) %>%
  mutate(term1 = if_else(xcoord_1 == 3.2, 'acute_rejection.090', term1)) %>%
  mutate(term1 = if_else(xcoord_1 == 4.2, 'acute_rejection.365', term1)) %>%
  mutate(term2 = if_else(xcoord_2 == 6, 'healthy.000', 'other')) %>% 
  mutate(term2 = if_else(xcoord_2 == 0.8, 'no_rejection.000', term2)) %>% 
  mutate(term2 = if_else(xcoord_2 == 1.8, 'no_rejection.007', term2)) %>% 
  mutate(term2 = if_else(xcoord_2 == 2.8, 'no_rejection.090', term2)) %>% 
  mutate(term2 = if_else(xcoord_2 == 3.8, 'no_rejection.365', term2)) %>% 
  mutate(term2 = if_else(xcoord_2 == 5, 'acute_rejection.biopsy', term2)) %>% 
  mutate(term2 = if_else(xcoord_2 == 1.2, 'acute_rejection.000', term2)) %>% 
  mutate(term2 = if_else(xcoord_2 == 2.2, 'acute_rejection.007', term2)) %>%
  mutate(term2 = if_else(xcoord_2 == 3.2, 'acute_rejection.090', term2)) %>%
  mutate(term2 = if_else(xcoord_2 == 4.2, 'acute_rejection.365', term2))
  
  pair_table$p <- NA

4.3.2.2 Between-subjects comparisons

Open code
set.seed(16)
for (i in 1:17){
  dat_pair <- model_data %>% 
    filter(group_sep == paste(pair_table$term1[i])|
           group_sep == paste(pair_table$term2[i]))
  
  g1 <- dat_pair %>% filter(group_sep == paste(pair_table$term1[i]))
  g2 <- dat_pair %>% filter(group_sep == paste(pair_table$term2[i]))
  
  pair_table$p[i] <- wilcox.test(g1$il1_ra_value, g2$il1_ra_value, paired=FALSE)$p.value
}

4.3.2.3 Within-subject comparisons

Open code
set.seed(16)
for (i in 18:33){
  dat_pair <- model_data %>% 
    filter(group_sep == paste(pair_table$term1[i]) |
           group_sep == paste(pair_table$term2[i])) %>% 
    select(id, group_sep, il1_ra_value) %>% 
    pivot_wider(names_from = group_sep, values_from = il1_ra_value) %>% 
    filter(complete.cases(.)) %>% data.frame()
  
  g1 <- dat_pair[,2]
  g2 <- dat_pair[,3]
  
  pair_table$p[i] <- wilcox.test(c(g1), c(g2), paired=TRUE)$p.value
}

pair_table <- pair_table[-c(14:15, 19:20, 22, 25:26, 28, 30:33),]
pair_table$cole <- c(rep("black", 15), rep("blue3", 3), rep("red4", 3))
pair_table$fdr <- p.adjust(pair_table$p, method = 'BH')

4.3.2.4 Resulting table

Open code
## the whole `pair table`
pair_table
##                                           contrast xcoord_1 xcoord_2 anot_coord
## 1                     healthy vs. no rejection D_0      6.0      0.8        3.4
## 2                     healthy vs. no rejection D_7      6.0      1.8        3.9
## 3                    healthy vs. no rejection D_90      6.0      2.8        4.4
## 4                   healthy vs. no rejection D_365      6.0      3.8        4.9
## 5                  healthy vs. acute rejection D_0      6.0      1.2        3.6
## 6                  healthy vs. acute rejection D_7      6.0      2.2        4.1
## 7                 healthy vs. acute rejection D_90      6.0      3.2        4.6
## 8                healthy vs. acute rejection D_365      6.0      4.2        5.1
## 9             healthy vs. acute rejection D_biopsy      6.0      5.0        5.5
## 10        no rejection D_0 vs. acute rejection D_0      0.8      1.2        1.0
## 11        no rejection D_7 vs. acute rejection D_7      1.8      2.2        2.0
## 12      no rejection D_90 vs. acute rejection D_90      2.8      3.2        3.0
## 13    no rejection D_365 vs. acute rejection D_365      3.8      4.2        4.0
## 16  no rejection D_90 vs. acute rejection D_biopsy      2.8      5.0        3.9
## 17 no rejection D_365 vs. acute rejection D_biopsy      3.8      5.0        4.4
## 18           no rejection D_0 vs. no rejection D_7      0.8      1.8        1.3
## 21          no rejection D_7 vs. no rejection D_90      1.8      2.8        2.3
## 23        no rejection D_90 vs. no rejection D_365      2.8      3.8        3.3
## 24     acute rejection D_0 vs. acute rejection D_7      1.2      2.2        1.7
## 27    acute rejection D_7 vs. acute rejection D_90      2.2      3.2        2.7
## 29  acute rejection D_90 vs. acute rejection D_365      3.2      4.2        3.7
##                  term1                  term2            p  cole          fdr
## 1          healthy.000       no_rejection.000 6.278863e-18 black 1.318561e-16
## 2          healthy.000       no_rejection.007 4.243487e-16 black 4.455661e-15
## 3          healthy.000       no_rejection.090 1.424391e-11 black 9.970737e-11
## 4          healthy.000       no_rejection.365 6.321421e-09 black 1.896426e-08
## 5          healthy.000    acute_rejection.000 1.340189e-10 black 7.035992e-10
## 6          healthy.000    acute_rejection.007 2.975331e-10 black 1.249639e-09
## 7          healthy.000    acute_rejection.090 2.122261e-09 black 7.427913e-09
## 8          healthy.000    acute_rejection.365 9.383021e-06 black 2.189372e-05
## 9          healthy.000 acute_rejection.biopsy 1.355816e-07 black 3.559017e-07
## 10    no_rejection.000    acute_rejection.000 1.894461e-01 black 2.340216e-01
## 11    no_rejection.007    acute_rejection.007 6.256756e-02 black 9.581960e-02
## 12    no_rejection.090    acute_rejection.090 2.120715e-01 black 2.474167e-01
## 13    no_rejection.365    acute_rejection.365 6.387973e-02 black 9.581960e-02
## 16    no_rejection.090 acute_rejection.biopsy 1.110122e-01 black 1.554170e-01
## 17    no_rejection.365 acute_rejection.biopsy 8.746157e-01 black 8.746157e-01
## 18    no_rejection.000       no_rejection.007 6.409870e-05 blue3 1.346073e-04
## 21    no_rejection.007       no_rejection.090 5.571619e-01 blue3 6.158106e-01
## 23    no_rejection.090       no_rejection.365 2.581426e-02 blue3 4.517495e-02
## 24 acute_rejection.000    acute_rejection.007 1.422637e-01  red4 1.867211e-01
## 27 acute_rejection.007    acute_rejection.090 7.546941e-01  red4 7.924288e-01
## 29 acute_rejection.090    acute_rejection.365 2.400159e-02  red4 4.517495e-02

## only significant differences
pair_table %>% 
  filter(p<0.05) %>% 
  select(contrast, p, fdr) %>% 
  mutate(star = if_else(p<0.05, '*', '')) %>% 
  mutate(star = if_else(p<0.01, '**', star)) %>% 
  mutate(star = if_else(p<0.001, '***', star)) %>%        
  data.frame()
##                                          contrast            p          fdr
## 1                    healthy vs. no rejection D_0 6.278863e-18 1.318561e-16
## 2                    healthy vs. no rejection D_7 4.243487e-16 4.455661e-15
## 3                   healthy vs. no rejection D_90 1.424391e-11 9.970737e-11
## 4                  healthy vs. no rejection D_365 6.321421e-09 1.896426e-08
## 5                 healthy vs. acute rejection D_0 1.340189e-10 7.035992e-10
## 6                 healthy vs. acute rejection D_7 2.975331e-10 1.249639e-09
## 7                healthy vs. acute rejection D_90 2.122261e-09 7.427913e-09
## 8               healthy vs. acute rejection D_365 9.383021e-06 2.189372e-05
## 9            healthy vs. acute rejection D_biopsy 1.355816e-07 3.559017e-07
## 10          no rejection D_0 vs. no rejection D_7 6.409870e-05 1.346073e-04
## 11       no rejection D_90 vs. no rejection D_365 2.581426e-02 4.517495e-02
## 12 acute rejection D_90 vs. acute rejection D_365 2.400159e-02 4.517495e-02
##    star
## 1   ***
## 2   ***
## 3   ***
## 4   ***
## 5   ***
## 6   ***
## 7   ***
## 8   ***
## 9   ***
## 10  ***
## 11    *
## 12    *

pair_rest <- pair_table %>% 
  filter(p<0.05,
         term1 != 'healthy.000') %>% 
  mutate(star = if_else(p<0.05, '*', '')) %>% 
  mutate(star = if_else(p<0.01, '**', star)) %>% 
  mutate(star = if_else(p<0.001, '***', star)) %>%        
  data.frame()

4.3.3 Visualization

Open code

## plot
plotos <- data_long %>% 
  filter(!is.na(il1_ra_value)) %>% 
  mutate(group = factor(group, levels = 
                          c("no_rejection", 
                            "acute_rejection",
                            "healthy")),
         time_point = factor(time_point)) %>% 
  mutate(time_point = if_else(group == 'healthy', 'healthy', time_point)) %>% 
  mutate(group_sep = interaction(group, time_point)) %>% 
  
## plotting
  ggplot(aes(x=time_point, y=il1_ra_value)) +
  geom_boxplot(aes(fill=group, group = group_sep), outlier.shape = NA, 
               size=0.5,position = position_dodge(width = 0.84), color='black') +
  labs(x = "Time post TX", y = "IL-1 RA (pg/ml)") +
  scale_x_discrete(labels = c("Before TX", "7 days", "3 months", "365 days",
                              "Biopsy", "Healthy")) +
  theme(axis.text = element_text(size = 11),
        axis.title = element_text(size = 12),
        legend.text = element_text(size = 11),
        legend.title = element_text(size = 12)) +
  scale_fill_manual(values = c("no_rejection" = "skyblue2",
                               "acute_rejection" = "coral",
                               "healthy" = "darkolivegreen3"), 
                    labels = c("no rejection", "acute rejection", "healthy")) +
  coord_cartesian(ylim = c(0, 7000)) +
  annotate("text", x = 6, y = 2000, label = "#", size = 7) 

pair_rest$y <- c(6900, 4000, 3600)

plotos <- plotos + geom_segment(data = pair_rest, 
                                aes(x = xcoord_1, xend = xcoord_2, y = y, yend = y),
                                color = pair_rest$cole,
                                linetype = "solid", size = 0.4) 
plot_il1_ra <- plotos + annotate("text", x = pair_rest$anot_coord, y = pair_rest$y+50, 
                            label = pair_rest$star, size = 7, color=pair_rest$cole) 
plot_il1_ra

Open code

plotac <- 'plot_il1_ra'

path = paste0('gitignore/figures/',plotac, '.eps')
if(file.exists(path) == FALSE){
  ggsave(path, 
         plot = get(plotac), width = 7.5, height = 5.6, units = "in")
}

4.4 il18

4.4.1 Mixed model

Open code

## filtering data
model_data <- data_long %>% 
  filter(!is.na(il18_value))

## model fit
model_il18 <-  lmer(log10(il18_value) ~ 
                       group_sep +
                       (1|id), data = model_data)

## diagnostic plot of model
plot(model_il18)

Open code

## anova result od model
Anova(model_il18, type=2, test.statistic='F')
## Analysis of Deviance Table (Type II Wald F tests with Kenward-Roger df)
## 
## Response: log10(il18_value)
##                F Df Df.res    Pr(>F)    
## group_sep 23.496  9 412.76 < 2.2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

## model summary
summary(model_il18)
## Linear mixed model fit by REML ['lmerMod']
## Formula: log10(il18_value) ~ group_sep + (1 | id)
##    Data: model_data
## 
## REML criterion at convergence: 290.7
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -5.4547 -0.5610 -0.0786  0.4362  3.2320 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  id       (Intercept) 0.03004  0.1733  
##  Residual             0.07579  0.2753  
## Number of obs: 500, groups:  id, 186
## 
## Fixed effects:
##                                  Estimate Std. Error t value
## (Intercept)                      2.706285   0.051611  52.436
## group_sephealthy.000            -0.433108   0.069774  -6.207
## group_sepno_rejection.000        0.181152   0.061559   2.943
## group_sepacute_rejection.007    -0.250706   0.061125  -4.102
## group_sepno_rejection.007       -0.173250   0.061559  -2.814
## group_sepacute_rejection.090     0.133694   0.062099   2.153
## group_sepno_rejection.090        0.124231   0.071958   1.726
## group_sepacute_rejection.365     0.050040   0.065106   0.769
## group_sepno_rejection.365       -0.003025   0.071958  -0.042
## group_sepacute_rejection.biopsy  0.127269   0.069595   1.829
## 
## Correlation of Fixed Effects:
##              (Intr) g_.000 g__.000 grp_spc_.007 grp_spn_.007 grp_spc_.090
## grp_sph.000  -0.740                                                      
## grp_sp_.000  -0.838  0.620                                               
## grp_spc_.007 -0.626  0.463  0.525                                        
## grp_spn_.007 -0.838  0.620  0.787   0.525                                
## grp_spc_.090 -0.619  0.458  0.519   0.521        0.519                   
## grp_spn_.090 -0.717  0.531  0.673   0.449        0.673        0.444      
## grp_spc_.365 -0.593  0.438  0.497   0.498        0.497        0.492      
## grp_spn_.365 -0.717  0.531  0.673   0.449        0.673        0.444      
## grp_spct_r.  -0.551  0.407  0.462   0.462        0.462        0.458      
##              grp_spn_.090 grp_spc_.365 grp_spn_.365
## grp_sph.000                                        
## grp_sp_.000                                        
## grp_spc_.007                                       
## grp_spn_.007                                       
## grp_spc_.090                                       
## grp_spn_.090                                       
## grp_spc_.365  0.425                                
## grp_spn_.365  0.625        0.425                   
## grp_spct_r.   0.395        0.432        0.395

4.4.2 Pairwise comparison

4.4.2.1 List of contrasts

List of contrast names and left and right coordinates on the X axis

Open code
contrast <- c(

  ## healthy vs. others
  "healthy vs. no rejection D_0",
  "healthy vs. no rejection D_7",
  "healthy vs. no rejection D_90",
  "healthy vs. no rejection D_365",
  "healthy vs. acute rejection D_0",
  "healthy vs. acute rejection D_7",
  "healthy vs. acute rejection D_90",
  "healthy vs. acute rejection D_365",
  "healthy vs. acute rejection D_biopsy",


  ## between-subjects comparisons
  "no rejection D_0 vs. acute rejection D_0",
  "no rejection D_7 vs. acute rejection D_7",
  "no rejection D_90 vs. acute rejection D_90",
  "no rejection D_365 vs. acute rejection D_365",
  "no rejection D_0 vs. acute rejection D_biopsy",
  "no rejection D_7 vs. acute rejection D_biopsy",
  "no rejection D_90 vs. acute rejection D_biopsy",
  "no rejection D_365 vs. acute rejection D_biopsy",

  ## within-subjects comparisons
  ### no rejection
  "no rejection D_0 vs. no rejection D_7",
  "no rejection D_0 vs. no rejection D_90",
  "no rejection D_0 vs. no rejection D_365",
  "no rejection D_7 vs. no rejection D_90",
  "no rejection D_7 vs. no rejection D_365",
  "no rejection D_90 vs. no rejection D_365",

    ### acute rejection
  "acute rejection D_0 vs. acute rejection D_7",
  "acute rejection D_0 vs. acute rejection D_90",
  "acute rejection D_0 vs. acute rejection D_365",
  "acute rejection D_7 vs. acute rejection D_90",
  "acute rejection D_7 vs. acute rejection D_365",
  "acute rejection D_90 vs. acute rejection D_365",
  "acute rejection D_0 vs. acute rejection D_biopsy",
  "acute rejection D_7 vs. acute rejection D_biopsy",
  "acute rejection D_90 vs. acute rejection D_biopsy",
  "acute rejection D_365 vs. acute rejection D_biopsy"
  )
xcoord_1 <- c(rep(6, 9), seq(0.8, 3.8, 1), seq(0.8, 3.8, 1),
              rep(0.8, 3), rep(1.8, 2), 2.8,
              rep(1.2, 3), rep(2.2, 2), 3.2,
              seq(1.2, 4.2, 1))

xcoord_2 <- c(seq(0.8, 3.8, 1), seq(1.2, 4.2, 1),
              5, seq(1.2, 4.2, 1), rep(5, 4),
              seq(1.8, 3.8, 1), 2.8, 3.8, 3.8,
              2.2, 3.2, 4.2, 3.2, 4.2, 4.2,
              rep(5, 4))

anot_coord <- (xcoord_1+xcoord_2)/2

pair_table <- data.frame(contrast, xcoord_1, xcoord_2,
                         anot_coord)

pair_table <- pair_table %>% 
  mutate(term1 = if_else(xcoord_1 == 6, 'healthy.000', 'other')) %>% 
  mutate(term1 = if_else(xcoord_1 == 0.8, 'no_rejection.000', term1)) %>% 
  mutate(term1 = if_else(xcoord_1 == 1.8, 'no_rejection.007', term1)) %>% 
  mutate(term1 = if_else(xcoord_1 == 2.8, 'no_rejection.090', term1)) %>% 
  mutate(term1 = if_else(xcoord_1 == 3.8, 'no_rejection.365', term1)) %>% 
  mutate(term1 = if_else(xcoord_1 == 5, 'acute_rejection.biopsy', term1)) %>% 
  mutate(term1 = if_else(xcoord_1 == 1.2, 'acute_rejection.000', term1)) %>% 
  mutate(term1 = if_else(xcoord_1 == 2.2, 'acute_rejection.007', term1)) %>%
  mutate(term1 = if_else(xcoord_1 == 3.2, 'acute_rejection.090', term1)) %>%
  mutate(term1 = if_else(xcoord_1 == 4.2, 'acute_rejection.365', term1)) %>%
  mutate(term2 = if_else(xcoord_2 == 6, 'healthy.000', 'other')) %>% 
  mutate(term2 = if_else(xcoord_2 == 0.8, 'no_rejection.000', term2)) %>% 
  mutate(term2 = if_else(xcoord_2 == 1.8, 'no_rejection.007', term2)) %>% 
  mutate(term2 = if_else(xcoord_2 == 2.8, 'no_rejection.090', term2)) %>% 
  mutate(term2 = if_else(xcoord_2 == 3.8, 'no_rejection.365', term2)) %>% 
  mutate(term2 = if_else(xcoord_2 == 5, 'acute_rejection.biopsy', term2)) %>% 
  mutate(term2 = if_else(xcoord_2 == 1.2, 'acute_rejection.000', term2)) %>% 
  mutate(term2 = if_else(xcoord_2 == 2.2, 'acute_rejection.007', term2)) %>%
  mutate(term2 = if_else(xcoord_2 == 3.2, 'acute_rejection.090', term2)) %>%
  mutate(term2 = if_else(xcoord_2 == 4.2, 'acute_rejection.365', term2))
  
  pair_table$p <- NA

4.4.2.2 Between-subjects comparisons

Open code
set.seed(16)
for (i in 1:17){
  dat_pair <- model_data %>% 
    filter(group_sep == paste(pair_table$term1[i])|
           group_sep == paste(pair_table$term2[i]))
  
  g1 <- dat_pair %>% filter(group_sep == paste(pair_table$term1[i]))
  g2 <- dat_pair %>% filter(group_sep == paste(pair_table$term2[i]))
  
  pair_table$p[i] <- wilcox.test(g1$il18_value, g2$il18_value, paired=FALSE)$p.value
}

4.4.2.3 Within-subject comparisons

Open code
set.seed(16)
for (i in 18:33){
  dat_pair <- model_data %>% 
    filter(group_sep == paste(pair_table$term1[i]) |
           group_sep == paste(pair_table$term2[i])) %>% 
    select(id, group_sep, il18_value) %>% 
    pivot_wider(names_from = group_sep, values_from = il18_value) %>% 
    filter(complete.cases(.)) %>% data.frame()
  
  g1 <- dat_pair[,2]
  g2 <- dat_pair[,3]
  
  pair_table$p[i] <- wilcox.test(c(g1), c(g2), paired=TRUE)$p.value
}

pair_table <- pair_table[-c(14:15, 19:20, 22, 25:26, 28, 30:33),]
pair_table$cole <- c(rep("black", 15), rep("blue3", 3), rep("red4", 3))
pair_table$fdr <- p.adjust(pair_table$p, method = 'BH')

4.4.2.4 Resulting table

Open code
## the whole `pair table`
pair_table
##                                           contrast xcoord_1 xcoord_2 anot_coord
## 1                     healthy vs. no rejection D_0      6.0      0.8        3.4
## 2                     healthy vs. no rejection D_7      6.0      1.8        3.9
## 3                    healthy vs. no rejection D_90      6.0      2.8        4.4
## 4                   healthy vs. no rejection D_365      6.0      3.8        4.9
## 5                  healthy vs. acute rejection D_0      6.0      1.2        3.6
## 6                  healthy vs. acute rejection D_7      6.0      2.2        4.1
## 7                 healthy vs. acute rejection D_90      6.0      3.2        4.6
## 8                healthy vs. acute rejection D_365      6.0      4.2        5.1
## 9             healthy vs. acute rejection D_biopsy      6.0      5.0        5.5
## 10        no rejection D_0 vs. acute rejection D_0      0.8      1.2        1.0
## 11        no rejection D_7 vs. acute rejection D_7      1.8      2.2        2.0
## 12      no rejection D_90 vs. acute rejection D_90      2.8      3.2        3.0
## 13    no rejection D_365 vs. acute rejection D_365      3.8      4.2        4.0
## 16  no rejection D_90 vs. acute rejection D_biopsy      2.8      5.0        3.9
## 17 no rejection D_365 vs. acute rejection D_biopsy      3.8      5.0        4.4
## 18           no rejection D_0 vs. no rejection D_7      0.8      1.8        1.3
## 21          no rejection D_7 vs. no rejection D_90      1.8      2.8        2.3
## 23        no rejection D_90 vs. no rejection D_365      2.8      3.8        3.3
## 24     acute rejection D_0 vs. acute rejection D_7      1.2      2.2        1.7
## 27    acute rejection D_7 vs. acute rejection D_90      2.2      3.2        2.7
## 29  acute rejection D_90 vs. acute rejection D_365      3.2      4.2        3.7
##                  term1                  term2            p  cole          fdr
## 1          healthy.000       no_rejection.000 1.671896e-16 black 3.510982e-15
## 2          healthy.000       no_rejection.007 8.598524e-08 black 2.006322e-07
## 3          healthy.000       no_rejection.090 2.667314e-13 black 1.867120e-12
## 4          healthy.000       no_rejection.365 2.761390e-10 black 8.284170e-10
## 5          healthy.000    acute_rejection.000 2.124780e-06 black 4.056397e-06
## 6          healthy.000    acute_rejection.007 4.471962e-02 black 5.524189e-02
## 7          healthy.000    acute_rejection.090 8.245243e-13 black 4.328752e-12
## 8          healthy.000    acute_rejection.365 1.675587e-12 black 7.037463e-12
## 9          healthy.000 acute_rejection.biopsy 4.551076e-11 black 1.592877e-10
## 10    no_rejection.000    acute_rejection.000 2.664446e-02 black 3.497086e-02
## 11    no_rejection.007    acute_rejection.007 1.305168e-01 black 1.522696e-01
## 12    no_rejection.090    acute_rejection.090 7.088759e-01 black 7.088759e-01
## 13    no_rejection.365    acute_rejection.365 1.722459e-02 black 2.411443e-02
## 16    no_rejection.090 acute_rejection.biopsy 3.083806e-01 black 3.237997e-01
## 17    no_rejection.365 acute_rejection.biopsy 2.268561e-03 black 3.664598e-03
## 18    no_rejection.000       no_rejection.007 1.006443e-13 blue3 1.056765e-12
## 21    no_rejection.007       no_rejection.090 1.011576e-07 blue3 2.124310e-07
## 23    no_rejection.090       no_rejection.365 6.539723e-03 blue3 9.809584e-03
## 24 acute_rejection.000    acute_rejection.007 4.081365e-05  red4 7.142390e-05
## 27 acute_rejection.007    acute_rejection.090 3.163223e-09  red4 8.303459e-09
## 29 acute_rejection.090    acute_rejection.365 2.312297e-01  red4 2.555696e-01

## only significant differences
pair_table %>% 
  filter(p<0.05) %>% 
  select(contrast, p, fdr) %>% 
  mutate(star = if_else(p<0.05, '*', '')) %>% 
  mutate(star = if_else(p<0.01, '**', star)) %>% 
  mutate(star = if_else(p<0.001, '***', star)) %>%        
  data.frame()
##                                           contrast            p          fdr
## 1                     healthy vs. no rejection D_0 1.671896e-16 3.510982e-15
## 2                     healthy vs. no rejection D_7 8.598524e-08 2.006322e-07
## 3                    healthy vs. no rejection D_90 2.667314e-13 1.867120e-12
## 4                   healthy vs. no rejection D_365 2.761390e-10 8.284170e-10
## 5                  healthy vs. acute rejection D_0 2.124780e-06 4.056397e-06
## 6                  healthy vs. acute rejection D_7 4.471962e-02 5.524189e-02
## 7                 healthy vs. acute rejection D_90 8.245243e-13 4.328752e-12
## 8                healthy vs. acute rejection D_365 1.675587e-12 7.037463e-12
## 9             healthy vs. acute rejection D_biopsy 4.551076e-11 1.592877e-10
## 10        no rejection D_0 vs. acute rejection D_0 2.664446e-02 3.497086e-02
## 11    no rejection D_365 vs. acute rejection D_365 1.722459e-02 2.411443e-02
## 12 no rejection D_365 vs. acute rejection D_biopsy 2.268561e-03 3.664598e-03
## 13           no rejection D_0 vs. no rejection D_7 1.006443e-13 1.056765e-12
## 14          no rejection D_7 vs. no rejection D_90 1.011576e-07 2.124310e-07
## 15        no rejection D_90 vs. no rejection D_365 6.539723e-03 9.809584e-03
## 16     acute rejection D_0 vs. acute rejection D_7 4.081365e-05 7.142390e-05
## 17    acute rejection D_7 vs. acute rejection D_90 3.163223e-09 8.303459e-09
##    star
## 1   ***
## 2   ***
## 3   ***
## 4   ***
## 5   ***
## 6     *
## 7   ***
## 8   ***
## 9   ***
## 10    *
## 11    *
## 12   **
## 13  ***
## 14  ***
## 15   **
## 16  ***
## 17  ***

pair_rest <- pair_table %>% 
  filter(p<0.05,
         term1 != 'healthy.000') %>% 
  mutate(star = if_else(p<0.05, '*', '')) %>% 
  mutate(star = if_else(p<0.01, '**', star)) %>% 
  mutate(star = if_else(p<0.001, '***', star)) %>%        
  data.frame()

4.4.3 Visualization

Open code

## plot
plotos <- data_long %>% 
  filter(!is.na(il18_value)) %>% 
  mutate(group = factor(group, levels = 
                          c("no_rejection", 
                            "acute_rejection",
                            "healthy")),
         time_point = factor(time_point)) %>% 
  mutate(time_point = if_else(group == 'healthy', 'healthy', time_point)) %>% 
  mutate(group_sep = interaction(group, time_point)) %>% 
  
## plotting
  ggplot(aes(x=time_point, y=il18_value)) +
  geom_boxplot(aes(fill=group, group = group_sep), outlier.shape = NA, 
               size=0.5,position = position_dodge(width = 0.84), color='black') +
  labs(x = "Time post TX", y = "IL-18 (pg/ml)") +
  scale_x_discrete(labels = c("Before TX", "7 days", "3 months", "365 days",
                              "Biopsy", "Healthy")) +
  theme(axis.text = element_text(size = 11),
        axis.title = element_text(size = 12),
        legend.text = element_text(size = 11),
        legend.title = element_text(size = 12)) +
  scale_fill_manual(values = c("no_rejection" = "skyblue2",
                               "acute_rejection" = "coral",
                               "healthy" = "darkolivegreen3"), 
                    labels = c("no rejection", "acute rejection", "healthy")) +
  coord_cartesian(ylim = c(0, 3000)) +
  annotate("text", x = 6, y = 700, label = "#", size = 7) 

pair_rest$y <- c(2700, 1000, 1700, 2900, 2300, 2100, 1900, 1700)

plotos <- plotos + geom_segment(data = pair_rest, 
                                aes(x = xcoord_1, xend = xcoord_2, y = y, yend = y),
                                color = pair_rest$cole,
                                linetype = "solid", size = 0.4) 
plot_il18 <- plotos + annotate("text", x = pair_rest$anot_coord, y = pair_rest$y+50, 
                            label = pair_rest$star, size = 7, color=pair_rest$cole) 
plot_il18

Open code

plotac <- 'plot_il18'

path = paste0('gitignore/figures/',plotac, '.eps')
if(file.exists(path) == FALSE){
  ggsave(path, 
         plot = get(plotac), width = 7.5, height = 5.6, units = "in")
}

4.5 il18_bp

4.5.1 Mixed model

Open code

## filtering data
model_data <- data_long %>% 
  filter(!is.na(il18_bp_value))

## model fit
model_il18_bp <-  lmer(log10(il18_bp_value) ~ 
                       group_sep +
                       (1|id), data = model_data)

## diagnostic plot of model
plot(model_il18_bp)

Open code

## anova result od model
Anova(model_il18_bp, type=2, test.statistic='F')
## Analysis of Deviance Table (Type II Wald F tests with Kenward-Roger df)
## 
## Response: log10(il18_bp_value)
##                F Df Df.res    Pr(>F)    
## group_sep 8.4695  9  489.8 8.293e-12 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

## model summary
summary(model_il18_bp)
## Linear mixed model fit by REML ['lmerMod']
## Formula: log10(il18_bp_value) ~ group_sep + (1 | id)
##    Data: model_data
## 
## REML criterion at convergence: -484.2
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -10.0578  -0.3070   0.0384   0.3462   4.8019 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  id       (Intercept) 0.006046 0.07775 
##  Residual             0.018843 0.13727 
## Number of obs: 577, groups:  id, 169
## 
## Fixed effects:
##                                  Estimate Std. Error t value
## (Intercept)                      3.614819   0.024804 145.735
## group_sephealthy.000            -0.165875   0.037658  -4.405
## group_sepno_rejection.000        0.004244   0.029707   0.143
## group_sepacute_rejection.007    -0.061525   0.030101  -2.044
## group_sepno_rejection.007       -0.046670   0.029665  -1.573
## group_sepacute_rejection.090    -0.121220   0.030711  -3.947
## group_sepno_rejection.090       -0.109015   0.029982  -3.636
## group_sepacute_rejection.365    -0.092007   0.031914  -2.883
## group_sepno_rejection.365       -0.121527   0.030184  -4.026
## group_sepacute_rejection.biopsy -0.053131   0.034328  -1.548
## 
## Correlation of Fixed Effects:
##              (Intr) g_.000 g__.000 grp_spc_.007 grp_spn_.007 grp_spc_.090
## grp_sph.000  -0.659                                                      
## grp_sp_.000  -0.835  0.550                                               
## grp_spc_.007 -0.640  0.422  0.534                                        
## grp_spn_.007 -0.836  0.551  0.771   0.535                                
## grp_spc_.090 -0.628  0.414  0.524   0.517        0.525                   
## grp_spn_.090 -0.827  0.545  0.763   0.529        0.764        0.520      
## grp_spc_.365 -0.606  0.399  0.506   0.499        0.507        0.489      
## grp_spn_.365 -0.822  0.541  0.758   0.526        0.759        0.516      
## grp_spct_r.  -0.556  0.366  0.464   0.458        0.465        0.449      
##              grp_spn_.090 grp_spc_.365 grp_spn_.365
## grp_sph.000                                        
## grp_sp_.000                                        
## grp_spc_.007                                       
## grp_spn_.007                                       
## grp_spc_.090                                       
## grp_spn_.090                                       
## grp_spc_.365  0.501                                
## grp_spn_.365  0.752        0.498                   
## grp_spct_r.   0.460        0.428        0.457

4.5.2 Pairwise comparison

4.5.2.1 List of contrasts

List of contrast names and left and right coordinates on the X axis

Open code
contrast <- c(

  ## healthy vs. others
  "healthy vs. no rejection D_0",
  "healthy vs. no rejection D_7",
  "healthy vs. no rejection D_90",
  "healthy vs. no rejection D_365",
  "healthy vs. acute rejection D_0",
  "healthy vs. acute rejection D_7",
  "healthy vs. acute rejection D_90",
  "healthy vs. acute rejection D_365",
  "healthy vs. acute rejection D_biopsy",


  ## between-subjects comparisons
  "no rejection D_0 vs. acute rejection D_0",
  "no rejection D_7 vs. acute rejection D_7",
  "no rejection D_90 vs. acute rejection D_90",
  "no rejection D_365 vs. acute rejection D_365",
  "no rejection D_0 vs. acute rejection D_biopsy",
  "no rejection D_7 vs. acute rejection D_biopsy",
  "no rejection D_90 vs. acute rejection D_biopsy",
  "no rejection D_365 vs. acute rejection D_biopsy",

  ## within-subjects comparisons
  ### no rejection
  "no rejection D_0 vs. no rejection D_7",
  "no rejection D_0 vs. no rejection D_90",
  "no rejection D_0 vs. no rejection D_365",
  "no rejection D_7 vs. no rejection D_90",
  "no rejection D_7 vs. no rejection D_365",
  "no rejection D_90 vs. no rejection D_365",

    ### acute rejection
  "acute rejection D_0 vs. acute rejection D_7",
  "acute rejection D_0 vs. acute rejection D_90",
  "acute rejection D_0 vs. acute rejection D_365",
  "acute rejection D_7 vs. acute rejection D_90",
  "acute rejection D_7 vs. acute rejection D_365",
  "acute rejection D_90 vs. acute rejection D_365",
  "acute rejection D_0 vs. acute rejection D_biopsy",
  "acute rejection D_7 vs. acute rejection D_biopsy",
  "acute rejection D_90 vs. acute rejection D_biopsy",
  "acute rejection D_365 vs. acute rejection D_biopsy"
  )
xcoord_1 <- c(rep(6, 9), seq(0.8, 3.8, 1), seq(0.8, 3.8, 1),
              rep(0.8, 3), rep(1.8, 2), 2.8,
              rep(1.2, 3), rep(2.2, 2), 3.2,
              seq(1.2, 4.2, 1))

xcoord_2 <- c(seq(0.8, 3.8, 1), seq(1.2, 4.2, 1),
              5, seq(1.2, 4.2, 1), rep(5, 4),
              seq(1.8, 3.8, 1), 2.8, 3.8, 3.8,
              2.2, 3.2, 4.2, 3.2, 4.2, 4.2,
              rep(5, 4))

anot_coord <- (xcoord_1+xcoord_2)/2

pair_table <- data.frame(contrast, xcoord_1, xcoord_2,
                         anot_coord)

pair_table <- pair_table %>% 
  mutate(term1 = if_else(xcoord_1 == 6, 'healthy.000', 'other')) %>% 
  mutate(term1 = if_else(xcoord_1 == 0.8, 'no_rejection.000', term1)) %>% 
  mutate(term1 = if_else(xcoord_1 == 1.8, 'no_rejection.007', term1)) %>% 
  mutate(term1 = if_else(xcoord_1 == 2.8, 'no_rejection.090', term1)) %>% 
  mutate(term1 = if_else(xcoord_1 == 3.8, 'no_rejection.365', term1)) %>% 
  mutate(term1 = if_else(xcoord_1 == 5, 'acute_rejection.biopsy', term1)) %>% 
  mutate(term1 = if_else(xcoord_1 == 1.2, 'acute_rejection.000', term1)) %>% 
  mutate(term1 = if_else(xcoord_1 == 2.2, 'acute_rejection.007', term1)) %>%
  mutate(term1 = if_else(xcoord_1 == 3.2, 'acute_rejection.090', term1)) %>%
  mutate(term1 = if_else(xcoord_1 == 4.2, 'acute_rejection.365', term1)) %>%
  mutate(term2 = if_else(xcoord_2 == 6, 'healthy.000', 'other')) %>% 
  mutate(term2 = if_else(xcoord_2 == 0.8, 'no_rejection.000', term2)) %>% 
  mutate(term2 = if_else(xcoord_2 == 1.8, 'no_rejection.007', term2)) %>% 
  mutate(term2 = if_else(xcoord_2 == 2.8, 'no_rejection.090', term2)) %>% 
  mutate(term2 = if_else(xcoord_2 == 3.8, 'no_rejection.365', term2)) %>% 
  mutate(term2 = if_else(xcoord_2 == 5, 'acute_rejection.biopsy', term2)) %>% 
  mutate(term2 = if_else(xcoord_2 == 1.2, 'acute_rejection.000', term2)) %>% 
  mutate(term2 = if_else(xcoord_2 == 2.2, 'acute_rejection.007', term2)) %>%
  mutate(term2 = if_else(xcoord_2 == 3.2, 'acute_rejection.090', term2)) %>%
  mutate(term2 = if_else(xcoord_2 == 4.2, 'acute_rejection.365', term2))
  
  pair_table$p <- NA

4.5.2.2 Between-subjects comparisons

Open code
set.seed(16)
for (i in 1:17){
  dat_pair <- model_data %>% 
    filter(group_sep == paste(pair_table$term1[i])|
           group_sep == paste(pair_table$term2[i]))
  
  g1 <- dat_pair %>% filter(group_sep == paste(pair_table$term1[i]))
  g2 <- dat_pair %>% filter(group_sep == paste(pair_table$term2[i]))
  
  pair_table$p[i] <- wilcox.test(g1$il18_bp_value, g2$il18_bp_value, paired=FALSE)$p.value
}

4.5.2.3 Within-subject comparisons

Open code
set.seed(16)
for (i in 18:33){
  dat_pair <- model_data %>% 
    filter(group_sep == paste(pair_table$term1[i]) |
           group_sep == paste(pair_table$term2[i])) %>% 
    select(id, group_sep, il18_bp_value) %>% 
    pivot_wider(names_from = group_sep, values_from = il18_bp_value) %>% 
    filter(complete.cases(.)) %>% data.frame()
  
  g1 <- dat_pair[,2]
  g2 <- dat_pair[,3]
  
  pair_table$p[i] <- wilcox.test(c(g1), c(g2), paired=TRUE)$p.value
}

pair_table <- pair_table[-c(14:15, 19:20, 22, 25:26, 28, 30:33),]
pair_table$cole <- c(rep("black", 15), rep("blue3", 3), rep("red4", 3))
pair_table$fdr <- p.adjust(pair_table$p, method = 'BH')

4.5.2.4 Resulting table

Open code
## the whole `pair table`
pair_table
##                                           contrast xcoord_1 xcoord_2 anot_coord
## 1                     healthy vs. no rejection D_0      6.0      0.8        3.4
## 2                     healthy vs. no rejection D_7      6.0      1.8        3.9
## 3                    healthy vs. no rejection D_90      6.0      2.8        4.4
## 4                   healthy vs. no rejection D_365      6.0      3.8        4.9
## 5                  healthy vs. acute rejection D_0      6.0      1.2        3.6
## 6                  healthy vs. acute rejection D_7      6.0      2.2        4.1
## 7                 healthy vs. acute rejection D_90      6.0      3.2        4.6
## 8                healthy vs. acute rejection D_365      6.0      4.2        5.1
## 9             healthy vs. acute rejection D_biopsy      6.0      5.0        5.5
## 10        no rejection D_0 vs. acute rejection D_0      0.8      1.2        1.0
## 11        no rejection D_7 vs. acute rejection D_7      1.8      2.2        2.0
## 12      no rejection D_90 vs. acute rejection D_90      2.8      3.2        3.0
## 13    no rejection D_365 vs. acute rejection D_365      3.8      4.2        4.0
## 16  no rejection D_90 vs. acute rejection D_biopsy      2.8      5.0        3.9
## 17 no rejection D_365 vs. acute rejection D_biopsy      3.8      5.0        4.4
## 18           no rejection D_0 vs. no rejection D_7      0.8      1.8        1.3
## 21          no rejection D_7 vs. no rejection D_90      1.8      2.8        2.3
## 23        no rejection D_90 vs. no rejection D_365      2.8      3.8        3.3
## 24     acute rejection D_0 vs. acute rejection D_7      1.2      2.2        1.7
## 27    acute rejection D_7 vs. acute rejection D_90      2.2      3.2        2.7
## 29  acute rejection D_90 vs. acute rejection D_365      3.2      4.2        3.7
##                  term1                  term2            p  cole          fdr
## 1          healthy.000       no_rejection.000 4.111120e-12 black 8.633353e-11
## 2          healthy.000       no_rejection.007 1.240228e-08 black 8.681598e-08
## 3          healthy.000       no_rejection.090 2.278600e-03 black 4.350054e-03
## 4          healthy.000       no_rejection.365 1.381490e-04 black 3.626412e-04
## 5          healthy.000    acute_rejection.000 1.711485e-09 black 1.797059e-08
## 6          healthy.000    acute_rejection.007 9.191676e-05 black 2.757503e-04
## 7          healthy.000    acute_rejection.090 4.719442e-02 black 6.607219e-02
## 8          healthy.000    acute_rejection.365 8.426347e-03 black 1.361179e-02
## 9          healthy.000 acute_rejection.biopsy 1.333362e-06 black 5.600122e-06
## 10    no_rejection.000    acute_rejection.000 3.168633e-01 black 3.696738e-01
## 11    no_rejection.007    acute_rejection.007 1.275900e-01 black 1.674619e-01
## 12    no_rejection.090    acute_rejection.090 4.543678e-01 black 5.021959e-01
## 13    no_rejection.365    acute_rejection.365 7.350379e-01 black 7.350379e-01
## 16    no_rejection.090 acute_rejection.biopsy 4.632816e-03 black 8.107427e-03
## 17    no_rejection.365 acute_rejection.biopsy 3.163257e-02 black 4.744886e-02
## 18    no_rejection.000       no_rejection.007 2.090599e-05 blue3 7.317096e-05
## 21    no_rejection.007       no_rejection.090 4.544604e-08 blue3 2.385917e-07
## 23    no_rejection.090       no_rejection.365 5.092835e-01 blue3 5.347477e-01
## 24 acute_rejection.000    acute_rejection.007 1.367483e-03  red4 2.943894e-03
## 27 acute_rejection.007    acute_rejection.090 1.401854e-03  red4 2.943894e-03
## 29 acute_rejection.090    acute_rejection.365 1.547263e-01  red4 1.911325e-01

## only significant differences
pair_table %>% 
  filter(p<0.05) %>% 
  select(contrast, p, fdr) %>% 
  mutate(star = if_else(p<0.05, '*', '')) %>% 
  mutate(star = if_else(p<0.01, '**', star)) %>% 
  mutate(star = if_else(p<0.001, '***', star)) %>%        
  data.frame()
##                                           contrast            p          fdr
## 1                     healthy vs. no rejection D_0 4.111120e-12 8.633353e-11
## 2                     healthy vs. no rejection D_7 1.240228e-08 8.681598e-08
## 3                    healthy vs. no rejection D_90 2.278600e-03 4.350054e-03
## 4                   healthy vs. no rejection D_365 1.381490e-04 3.626412e-04
## 5                  healthy vs. acute rejection D_0 1.711485e-09 1.797059e-08
## 6                  healthy vs. acute rejection D_7 9.191676e-05 2.757503e-04
## 7                 healthy vs. acute rejection D_90 4.719442e-02 6.607219e-02
## 8                healthy vs. acute rejection D_365 8.426347e-03 1.361179e-02
## 9             healthy vs. acute rejection D_biopsy 1.333362e-06 5.600122e-06
## 10  no rejection D_90 vs. acute rejection D_biopsy 4.632816e-03 8.107427e-03
## 11 no rejection D_365 vs. acute rejection D_biopsy 3.163257e-02 4.744886e-02
## 12           no rejection D_0 vs. no rejection D_7 2.090599e-05 7.317096e-05
## 13          no rejection D_7 vs. no rejection D_90 4.544604e-08 2.385917e-07
## 14     acute rejection D_0 vs. acute rejection D_7 1.367483e-03 2.943894e-03
## 15    acute rejection D_7 vs. acute rejection D_90 1.401854e-03 2.943894e-03
##    star
## 1   ***
## 2   ***
## 3    **
## 4   ***
## 5   ***
## 6   ***
## 7     *
## 8    **
## 9   ***
## 10   **
## 11    *
## 12  ***
## 13  ***
## 14   **
## 15   **

pair_rest <- pair_table %>% 
  filter(p<0.05,
         term1 != 'healthy.000') %>% 
  mutate(star = if_else(p<0.05, '*', '')) %>% 
  mutate(star = if_else(p<0.01, '**', star)) %>% 
  mutate(star = if_else(p<0.001, '***', star)) %>%        
  data.frame()

4.5.3 Visualization

Open code

## plot
plotos <- data_long %>% 
  filter(!is.na(il18_bp_value)) %>% 
  mutate(group = factor(group, levels = 
                          c("no_rejection", 
                            "acute_rejection",
                            "healthy")),
         time_point = factor(time_point)) %>% 
  mutate(time_point = if_else(group == 'healthy', 'healthy', time_point)) %>% 
  mutate(group_sep = interaction(group, time_point)) %>% 
  
## plotting
  ggplot(aes(x=time_point, y=il18_bp_value)) +
  geom_boxplot(aes(fill=group, group = group_sep), outlier.shape = NA, 
               size=0.5,position = position_dodge(width = 0.84), color='black') +
  labs(x = "Time post TX", y = "IL-18 BP (pg/ml)") +
  scale_x_discrete(labels = c("Before TX", "7 days", "3 months", "365 days",
                              "Biopsy", "Healthy")) +
  theme(axis.text = element_text(size = 11),
        axis.title = element_text(size = 12),
        legend.text = element_text(size = 11),
        legend.title = element_text(size = 12)) +
  scale_fill_manual(values = c("no_rejection" = "skyblue2",
                               "acute_rejection" = "coral",
                               "healthy" = "darkolivegreen3"), 
                    labels = c("no rejection", "acute rejection", "healthy")) +
  coord_cartesian(ylim = c(0, 7300)) +
  annotate("text", x = 6, y = 5000, label = "#", size = 7) 

pair_rest$y <- c(5800, 5500, 7200, 6900, 6400, 6100)

plotos <- plotos + geom_segment(data = pair_rest, 
                                aes(x = xcoord_1, xend = xcoord_2, y = y, yend = y),
                                color = pair_rest$cole,
                                linetype = "solid", size = 0.4) 
plot_il18_bp <- plotos + annotate("text", x = pair_rest$anot_coord, y = pair_rest$y+50, 
                            label = pair_rest$star, size = 7, color=pair_rest$cole) 
plot_il18_bp

Open code

plotac <- 'plot_il18_bp'

path = paste0('gitignore/figures/',plotac, '.eps')
if(file.exists(path) == FALSE){
  ggsave(path, 
         plot = get(plotac), width = 7.5, height = 5.6, units = "in")
}

4.6 il18_free

4.6.1 Mixed model

Open code

## filtering data
model_data <- data_long %>% 
  filter(!is.na(il18_free))

## model fit
model_il18_free <-  lmer(log10(il18_free) ~ 
                       group_sep +
                       (1|id), data = model_data)

## diagnostic plot of model
plot(model_il18_free)

Open code

## anova result od model
Anova(model_il18_free, type=2, test.statistic='F')
## Analysis of Deviance Table (Type II Wald F tests with Kenward-Roger df)
## 
## Response: log10(il18_free)
##                F Df Df.res    Pr(>F)    
## group_sep 19.077  9 401.57 < 2.2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

## model summary
summary(model_il18_free)
## Linear mixed model fit by REML ['lmerMod']
## Formula: log10(il18_free) ~ group_sep + (1 | id)
##    Data: model_data
## 
## REML criterion at convergence: 247.6
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.4008 -0.5625 -0.0955  0.4128  3.3292 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  id       (Intercept) 0.02494  0.1579  
##  Residual             0.07261  0.2695  
## Number of obs: 481, groups:  id, 169
## 
## Fixed effects:
##                                 Estimate Std. Error t value
## (Intercept)                      2.51490    0.05020  50.101
## group_sephealthy.000            -0.33233    0.07528  -4.415
## group_sepno_rejection.000        0.16742    0.05973   2.803
## group_sepacute_rejection.007    -0.23114    0.06029  -3.834
## group_sepno_rejection.007       -0.16130    0.05964  -2.704
## group_sepacute_rejection.090     0.17291    0.06123   2.824
## group_sepno_rejection.090        0.14789    0.06978   2.119
## group_sepacute_rejection.365     0.07912    0.06415   1.233
## group_sepno_rejection.365        0.01916    0.06978   0.275
## group_sepacute_rejection.biopsy  0.14763    0.06836   2.160
## 
## Correlation of Fixed Effects:
##              (Intr) g_.000 g__.000 grp_spc_.007 grp_spn_.007 grp_spc_.090
## grp_sph.000  -0.667                                                      
## grp_sp_.000  -0.840  0.560                                               
## grp_spc_.007 -0.643  0.429  0.540                                        
## grp_spn_.007 -0.842  0.561  0.782   0.541                                
## grp_spc_.090 -0.636  0.424  0.535   0.528        0.536                   
## grp_spn_.090 -0.719  0.480  0.669   0.463        0.669        0.458      
## grp_spc_.365 -0.610  0.407  0.513   0.506        0.514        0.500      
## grp_spn_.365 -0.719  0.480  0.669   0.463        0.669        0.458      
## grp_spct_r.  -0.566  0.378  0.476   0.469        0.477        0.465      
##              grp_spn_.090 grp_spc_.365 grp_spn_.365
## grp_sph.000                                        
## grp_sp_.000                                        
## grp_spc_.007                                       
## grp_spn_.007                                       
## grp_spc_.090                                       
## grp_spn_.090                                       
## grp_spc_.365  0.439                                
## grp_spn_.365  0.618        0.439                   
## grp_spct_r.   0.407        0.439        0.407

4.6.2 Pairwise comparison

4.6.2.1 List of contrasts

List of contrast names and left and right coordinates on the X axis

Open code
contrast <- c(

  ## healthy vs. others
  "healthy vs. no rejection D_0",
  "healthy vs. no rejection D_7",
  "healthy vs. no rejection D_90",
  "healthy vs. no rejection D_365",
  "healthy vs. acute rejection D_0",
  "healthy vs. acute rejection D_7",
  "healthy vs. acute rejection D_90",
  "healthy vs. acute rejection D_365",
  "healthy vs. acute rejection D_biopsy",


  ## between-subjects comparisons
  "no rejection D_0 vs. acute rejection D_0",
  "no rejection D_7 vs. acute rejection D_7",
  "no rejection D_90 vs. acute rejection D_90",
  "no rejection D_365 vs. acute rejection D_365",
  "no rejection D_0 vs. acute rejection D_biopsy",
  "no rejection D_7 vs. acute rejection D_biopsy",
  "no rejection D_90 vs. acute rejection D_biopsy",
  "no rejection D_365 vs. acute rejection D_biopsy",

  ## within-subjects comparisons
  ### no rejection
  "no rejection D_0 vs. no rejection D_7",
  "no rejection D_0 vs. no rejection D_90",
  "no rejection D_0 vs. no rejection D_365",
  "no rejection D_7 vs. no rejection D_90",
  "no rejection D_7 vs. no rejection D_365",
  "no rejection D_90 vs. no rejection D_365",

    ### acute rejection
  "acute rejection D_0 vs. acute rejection D_7",
  "acute rejection D_0 vs. acute rejection D_90",
  "acute rejection D_0 vs. acute rejection D_365",
  "acute rejection D_7 vs. acute rejection D_90",
  "acute rejection D_7 vs. acute rejection D_365",
  "acute rejection D_90 vs. acute rejection D_365",
  "acute rejection D_0 vs. acute rejection D_biopsy",
  "acute rejection D_7 vs. acute rejection D_biopsy",
  "acute rejection D_90 vs. acute rejection D_biopsy",
  "acute rejection D_365 vs. acute rejection D_biopsy"
  )
xcoord_1 <- c(rep(6, 9), seq(0.8, 3.8, 1), seq(0.8, 3.8, 1),
              rep(0.8, 3), rep(1.8, 2), 2.8,
              rep(1.2, 3), rep(2.2, 2), 3.2,
              seq(1.2, 4.2, 1))

xcoord_2 <- c(seq(0.8, 3.8, 1), seq(1.2, 4.2, 1),
              5, seq(1.2, 4.2, 1), rep(5, 4),
              seq(1.8, 3.8, 1), 2.8, 3.8, 3.8,
              2.2, 3.2, 4.2, 3.2, 4.2, 4.2,
              rep(5, 4))

anot_coord <- (xcoord_1+xcoord_2)/2

pair_table <- data.frame(contrast, xcoord_1, xcoord_2,
                         anot_coord)

pair_table <- pair_table %>% 
  mutate(term1 = if_else(xcoord_1 == 6, 'healthy.000', 'other')) %>% 
  mutate(term1 = if_else(xcoord_1 == 0.8, 'no_rejection.000', term1)) %>% 
  mutate(term1 = if_else(xcoord_1 == 1.8, 'no_rejection.007', term1)) %>% 
  mutate(term1 = if_else(xcoord_1 == 2.8, 'no_rejection.090', term1)) %>% 
  mutate(term1 = if_else(xcoord_1 == 3.8, 'no_rejection.365', term1)) %>% 
  mutate(term1 = if_else(xcoord_1 == 5, 'acute_rejection.biopsy', term1)) %>% 
  mutate(term1 = if_else(xcoord_1 == 1.2, 'acute_rejection.000', term1)) %>% 
  mutate(term1 = if_else(xcoord_1 == 2.2, 'acute_rejection.007', term1)) %>%
  mutate(term1 = if_else(xcoord_1 == 3.2, 'acute_rejection.090', term1)) %>%
  mutate(term1 = if_else(xcoord_1 == 4.2, 'acute_rejection.365', term1)) %>%
  mutate(term2 = if_else(xcoord_2 == 6, 'healthy.000', 'other')) %>% 
  mutate(term2 = if_else(xcoord_2 == 0.8, 'no_rejection.000', term2)) %>% 
  mutate(term2 = if_else(xcoord_2 == 1.8, 'no_rejection.007', term2)) %>% 
  mutate(term2 = if_else(xcoord_2 == 2.8, 'no_rejection.090', term2)) %>% 
  mutate(term2 = if_else(xcoord_2 == 3.8, 'no_rejection.365', term2)) %>% 
  mutate(term2 = if_else(xcoord_2 == 5, 'acute_rejection.biopsy', term2)) %>% 
  mutate(term2 = if_else(xcoord_2 == 1.2, 'acute_rejection.000', term2)) %>% 
  mutate(term2 = if_else(xcoord_2 == 2.2, 'acute_rejection.007', term2)) %>%
  mutate(term2 = if_else(xcoord_2 == 3.2, 'acute_rejection.090', term2)) %>%
  mutate(term2 = if_else(xcoord_2 == 4.2, 'acute_rejection.365', term2))
  
  pair_table$p <- NA

4.6.2.2 Between-subjects comparisons

Open code
set.seed(16)
for (i in 1:17){
  dat_pair <- model_data %>% 
    filter(group_sep == paste(pair_table$term1[i])|
           group_sep == paste(pair_table$term2[i]))
  
  g1 <- dat_pair %>% filter(group_sep == paste(pair_table$term1[i]))
  g2 <- dat_pair %>% filter(group_sep == paste(pair_table$term2[i]))
  
  pair_table$p[i] <- wilcox.test(g1$il18_free, g2$il18_free, paired=FALSE)$p.value
}

4.6.2.3 Within-subject comparisons

Open code
set.seed(16)
for (i in 18:33){
  dat_pair <- model_data %>%
    filter(group_sep == paste(pair_table$term1[i]) |
           group_sep == paste(pair_table$term2[i])) %>%
    select(id, group_sep, il18_free) %>%
    pivot_wider(names_from = group_sep, values_from = il18_free) %>%
    filter(complete.cases(.)) %>% data.frame()

  g1 <- dat_pair[,2]
  g2 <- dat_pair[,3]

  pair_table$p[i] <- wilcox.test(c(g1), c(g2), paired=TRUE)$p.value
}

pair_table <- pair_table[-c(14:15, 19:20, 22, 25:26, 28, 30:33),]
pair_table$cole <- c(rep("black", 15), rep("blue3", 3), rep("red4", 3))
pair_table$fdr <- p.adjust(pair_table$p, method = 'BH')

4.6.2.4 Resulting table

Open code
## the whole `pair table`
pair_table
##                                           contrast xcoord_1 xcoord_2 anot_coord
## 1                     healthy vs. no rejection D_0      6.0      0.8        3.4
## 2                     healthy vs. no rejection D_7      6.0      1.8        3.9
## 3                    healthy vs. no rejection D_90      6.0      2.8        4.4
## 4                   healthy vs. no rejection D_365      6.0      3.8        4.9
## 5                  healthy vs. acute rejection D_0      6.0      1.2        3.6
## 6                  healthy vs. acute rejection D_7      6.0      2.2        4.1
## 7                 healthy vs. acute rejection D_90      6.0      3.2        4.6
## 8                healthy vs. acute rejection D_365      6.0      4.2        5.1
## 9             healthy vs. acute rejection D_biopsy      6.0      5.0        5.5
## 10        no rejection D_0 vs. acute rejection D_0      0.8      1.2        1.0
## 11        no rejection D_7 vs. acute rejection D_7      1.8      2.2        2.0
## 12      no rejection D_90 vs. acute rejection D_90      2.8      3.2        3.0
## 13    no rejection D_365 vs. acute rejection D_365      3.8      4.2        4.0
## 16  no rejection D_90 vs. acute rejection D_biopsy      2.8      5.0        3.9
## 17 no rejection D_365 vs. acute rejection D_biopsy      3.8      5.0        4.4
## 18           no rejection D_0 vs. no rejection D_7      0.8      1.8        1.3
## 21          no rejection D_7 vs. no rejection D_90      1.8      2.8        2.3
## 23        no rejection D_90 vs. no rejection D_365      2.8      3.8        3.3
## 24     acute rejection D_0 vs. acute rejection D_7      1.2      2.2        1.7
## 27    acute rejection D_7 vs. acute rejection D_90      2.2      3.2        2.7
## 29  acute rejection D_90 vs. acute rejection D_365      3.2      4.2        3.7
##                  term1                  term2            p  cole          fdr
## 1          healthy.000       no_rejection.000 1.195713e-10 black 4.184996e-10
## 2          healthy.000       no_rejection.007 1.125705e-04 black 2.363980e-04
## 3          healthy.000       no_rejection.090 1.142557e-13 black 2.382870e-12
## 4          healthy.000       no_rejection.365 2.897492e-09 black 7.605918e-09
## 5          healthy.000    acute_rejection.000 1.390081e-04 black 2.646890e-04
## 6          healthy.000    acute_rejection.007 2.848719e-01 black 3.148584e-01
## 7          healthy.000    acute_rejection.090 2.269400e-13 black 2.382870e-12
## 8          healthy.000    acute_rejection.365 1.488787e-12 black 1.042151e-11
## 9          healthy.000 acute_rejection.biopsy 1.051022e-10 black 4.184996e-10
## 10    no_rejection.000    acute_rejection.000 3.508526e-02 black 4.604940e-02
## 11    no_rejection.007    acute_rejection.007 9.916951e-02 black 1.225035e-01
## 12    no_rejection.090    acute_rejection.090 4.724356e-01 black 4.724356e-01
## 13    no_rejection.365    acute_rejection.365 1.561394e-02 black 2.185951e-02
## 16    no_rejection.090 acute_rejection.biopsy 3.794611e-01 black 3.984342e-01
## 17    no_rejection.365 acute_rejection.biopsy 3.232913e-03 black 5.222398e-03
## 18    no_rejection.000       no_rejection.007 6.418077e-12 blue3 3.369490e-11
## 21    no_rejection.007       no_rejection.090 3.163586e-08 blue3 7.381702e-08
## 23    no_rejection.090       no_rejection.365 5.187312e-03 blue3 7.780968e-03
## 24 acute_rejection.000    acute_rejection.007 1.512508e-04  red4 2.646890e-04
## 27 acute_rejection.007    acute_rejection.090 1.644366e-09  red4 4.933099e-09
## 29 acute_rejection.090    acute_rejection.365 1.776244e-01  red4 2.072284e-01

## only significant differences
pair_table %>% 
  filter(p<0.05) %>% 
  select(contrast, p, fdr) %>% 
  mutate(star = if_else(p<0.05, '*', '')) %>% 
  mutate(star = if_else(p<0.01, '**', star)) %>% 
  mutate(star = if_else(p<0.001, '***', star)) %>%        
  data.frame()
##                                           contrast            p          fdr
## 1                     healthy vs. no rejection D_0 1.195713e-10 4.184996e-10
## 2                     healthy vs. no rejection D_7 1.125705e-04 2.363980e-04
## 3                    healthy vs. no rejection D_90 1.142557e-13 2.382870e-12
## 4                   healthy vs. no rejection D_365 2.897492e-09 7.605918e-09
## 5                  healthy vs. acute rejection D_0 1.390081e-04 2.646890e-04
## 6                 healthy vs. acute rejection D_90 2.269400e-13 2.382870e-12
## 7                healthy vs. acute rejection D_365 1.488787e-12 1.042151e-11
## 8             healthy vs. acute rejection D_biopsy 1.051022e-10 4.184996e-10
## 9         no rejection D_0 vs. acute rejection D_0 3.508526e-02 4.604940e-02
## 10    no rejection D_365 vs. acute rejection D_365 1.561394e-02 2.185951e-02
## 11 no rejection D_365 vs. acute rejection D_biopsy 3.232913e-03 5.222398e-03
## 12           no rejection D_0 vs. no rejection D_7 6.418077e-12 3.369490e-11
## 13          no rejection D_7 vs. no rejection D_90 3.163586e-08 7.381702e-08
## 14        no rejection D_90 vs. no rejection D_365 5.187312e-03 7.780968e-03
## 15     acute rejection D_0 vs. acute rejection D_7 1.512508e-04 2.646890e-04
## 16    acute rejection D_7 vs. acute rejection D_90 1.644366e-09 4.933099e-09
##    star
## 1   ***
## 2   ***
## 3   ***
## 4   ***
## 5   ***
## 6   ***
## 7   ***
## 8   ***
## 9     *
## 10    *
## 11   **
## 12  ***
## 13  ***
## 14   **
## 15  ***
## 16  ***

pair_rest <- pair_table %>% 
  filter(p<0.05,
         term1 != 'healthy.000') %>% 
  mutate(star = if_else(p<0.05, '*', '')) %>% 
  mutate(star = if_else(p<0.01, '**', star)) %>% 
  mutate(star = if_else(p<0.001, '***', star)) %>%        
  data.frame()

4.6.3 Visualization

Open code

## plot
plotos <- data_long %>% 
  filter(!is.na(il18_free)) %>% 
  mutate(group = factor(group, levels = 
                          c("no_rejection", 
                            "acute_rejection",
                            "healthy")),
         time_point = factor(time_point)) %>% 
  mutate(time_point = if_else(group == 'healthy', 'healthy', time_point)) %>% 
  mutate(group_sep = interaction(group, time_point)) %>% 
  
## plotting
  ggplot(aes(x=time_point, y=il18_free)) +
  geom_boxplot(aes(fill=group, group = group_sep), outlier.shape = NA, 
               size=0.5,position = position_dodge(width = 0.84), color='black') +
  labs(x = "Time post TX", y = "Free IL-18 (pg/ml)") +
  scale_x_discrete(labels = c("Before TX", "7 days", "3 months", "365 days",
                              "Biopsy", "Healthy")) +
  theme(axis.text = element_text(size = 11),
        axis.title = element_text(size = 12),
        legend.text = element_text(size = 11),
        legend.title = element_text(size = 12)) +
  scale_fill_manual(values = c("no_rejection" = "skyblue2",
                               "acute_rejection" = "coral",
                               "healthy" = "darkolivegreen3"), 
                    labels = c("no rejection", "acute rejection", "healthy")) +
  coord_cartesian(ylim = c(0, 1700)) +
  annotate("text", x = 6, y = 500, label = "#", size = 7) 

pair_rest$y <- c(1650,  700, 1060, 1720, 
                 830, 1200, 1350, 1280)

plotos <- plotos + geom_segment(data = pair_rest, 
                                aes(x = xcoord_1, xend = xcoord_2, y = y, yend = y),
                                color = pair_rest$cole,
                                linetype = "solid", size = 0.4) 
plot_il18_free <- plotos + annotate("text", x = pair_rest$anot_coord, y = pair_rest$y+5, 
                            label = pair_rest$star, size = 7, color=pair_rest$cole) 
plot_il18_free

Open code

plotac <- 'plot_il18_free'

path = paste0('gitignore/figures/',plotac, '.eps')
if(file.exists(path) == FALSE){
  ggsave(path, 
         plot = get(plotac), width = 7.5, height = 5.6, units = "in")
}

4.7 il36_b

4.7.1 Mixed model

Open code

## filtering data
model_data <- data_long %>% 
  filter(!is.na(il36_b_value))

## model fit
model_il36_b <-  lmer(log10(il36_b_value) ~ 
                       group_sep +
                       (1|id), data = model_data)

## diagnostic plot of model
plot(model_il36_b)

Open code

## anova result od model
Anova(model_il36_b, type=2, test.statistic='F')
## Analysis of Deviance Table (Type II Wald F tests with Kenward-Roger df)
## 
## Response: log10(il36_b_value)
##                F Df Df.res    Pr(>F)    
## group_sep 13.599  9 411.76 < 2.2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

## model summary
summary(model_il36_b)
## Linear mixed model fit by REML ['lmerMod']
## Formula: log10(il36_b_value) ~ group_sep + (1 | id)
##    Data: model_data
## 
## REML criterion at convergence: 566.3
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -4.3627 -0.3397  0.0080  0.4167  3.2126 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  id       (Intercept) 0.05778  0.2404  
##  Residual             0.13031  0.3610  
## Number of obs: 500, groups:  id, 186
## 
## Fixed effects:
##                                 Estimate Std. Error t value
## (Intercept)                      0.70905    0.06872  10.318
## group_sephealthy.000            -0.52054    0.09296  -5.600
## group_sepno_rejection.000        0.05180    0.08200   0.632
## group_sepacute_rejection.007    -0.16912    0.08016  -2.110
## group_sepno_rejection.007       -0.05161    0.08200  -0.629
## group_sepacute_rejection.090    -0.36787    0.08146  -4.516
## group_sepno_rejection.090       -0.13766    0.09559  -1.440
## group_sepacute_rejection.365    -0.52969    0.08543  -6.200
## group_sepno_rejection.365       -0.19032    0.09559  -1.991
## group_sepacute_rejection.biopsy -0.50731    0.09134  -5.554
## 
## Correlation of Fixed Effects:
##              (Intr) g_.000 g__.000 grp_spc_.007 grp_spn_.007 grp_spc_.090
## grp_sph.000  -0.739                                                      
## grp_sp_.000  -0.838  0.620                                               
## grp_spc_.007 -0.616  0.456  0.517                                        
## grp_spn_.007 -0.838  0.620  0.794   0.517                                
## grp_spc_.090 -0.610  0.451  0.511   0.521        0.511                   
## grp_spn_.090 -0.719  0.531  0.681   0.443        0.681        0.439      
## grp_spc_.365 -0.584  0.432  0.489   0.498        0.489        0.492      
## grp_spn_.365 -0.719  0.531  0.681   0.443        0.681        0.439      
## grp_spct_r.  -0.542  0.401  0.455   0.462        0.455        0.458      
##              grp_spn_.090 grp_spc_.365 grp_spn_.365
## grp_sph.000                                        
## grp_sp_.000                                        
## grp_spc_.007                                       
## grp_spn_.007                                       
## grp_spc_.090                                       
## grp_spn_.090                                       
## grp_spc_.365  0.420                                
## grp_spn_.365  0.634        0.420                   
## grp_spct_r.   0.390        0.432        0.390

4.7.2 Pairwise comparison

4.7.2.1 List of contrasts

List of contrast names and left and right coordinates on the X axis

Open code
contrast <- c(

  ## healthy vs. others
  "healthy vs. no rejection D_0",
  "healthy vs. no rejection D_7",
  "healthy vs. no rejection D_90",
  "healthy vs. no rejection D_365",
  "healthy vs. acute rejection D_0",
  "healthy vs. acute rejection D_7",
  "healthy vs. acute rejection D_90",
  "healthy vs. acute rejection D_365",
  "healthy vs. acute rejection D_biopsy",


  ## between-subjects comparisons
  "no rejection D_0 vs. acute rejection D_0",
  "no rejection D_7 vs. acute rejection D_7",
  "no rejection D_90 vs. acute rejection D_90",
  "no rejection D_365 vs. acute rejection D_365",
  "no rejection D_0 vs. acute rejection D_biopsy",
  "no rejection D_7 vs. acute rejection D_biopsy",
  "no rejection D_90 vs. acute rejection D_biopsy",
  "no rejection D_365 vs. acute rejection D_biopsy",

  ## within-subjects comparisons
  ### no rejection
  "no rejection D_0 vs. no rejection D_7",
  "no rejection D_0 vs. no rejection D_90",
  "no rejection D_0 vs. no rejection D_365",
  "no rejection D_7 vs. no rejection D_90",
  "no rejection D_7 vs. no rejection D_365",
  "no rejection D_90 vs. no rejection D_365",

    ### acute rejection
  "acute rejection D_0 vs. acute rejection D_7",
  "acute rejection D_0 vs. acute rejection D_90",
  "acute rejection D_0 vs. acute rejection D_365",
  "acute rejection D_7 vs. acute rejection D_90",
  "acute rejection D_7 vs. acute rejection D_365",
  "acute rejection D_90 vs. acute rejection D_365",
  "acute rejection D_0 vs. acute rejection D_biopsy",
  "acute rejection D_7 vs. acute rejection D_biopsy",
  "acute rejection D_90 vs. acute rejection D_biopsy",
  "acute rejection D_365 vs. acute rejection D_biopsy"
  )
xcoord_1 <- c(rep(6, 9), seq(0.8, 3.8, 1), seq(0.8, 3.8, 1),
              rep(0.8, 3), rep(1.8, 2), 2.8,
              rep(1.2, 3), rep(2.2, 2), 3.2,
              seq(1.2, 4.2, 1))

xcoord_2 <- c(seq(0.8, 3.8, 1), seq(1.2, 4.2, 1),
              5, seq(1.2, 4.2, 1), rep(5, 4),
              seq(1.8, 3.8, 1), 2.8, 3.8, 3.8,
              2.2, 3.2, 4.2, 3.2, 4.2, 4.2,
              rep(5, 4))

anot_coord <- (xcoord_1+xcoord_2)/2

pair_table <- data.frame(contrast, xcoord_1, xcoord_2,
                         anot_coord)

pair_table <- pair_table %>% 
  mutate(term1 = if_else(xcoord_1 == 6, 'healthy.000', 'other')) %>% 
  mutate(term1 = if_else(xcoord_1 == 0.8, 'no_rejection.000', term1)) %>% 
  mutate(term1 = if_else(xcoord_1 == 1.8, 'no_rejection.007', term1)) %>% 
  mutate(term1 = if_else(xcoord_1 == 2.8, 'no_rejection.090', term1)) %>% 
  mutate(term1 = if_else(xcoord_1 == 3.8, 'no_rejection.365', term1)) %>% 
  mutate(term1 = if_else(xcoord_1 == 5, 'acute_rejection.biopsy', term1)) %>% 
  mutate(term1 = if_else(xcoord_1 == 1.2, 'acute_rejection.000', term1)) %>% 
  mutate(term1 = if_else(xcoord_1 == 2.2, 'acute_rejection.007', term1)) %>%
  mutate(term1 = if_else(xcoord_1 == 3.2, 'acute_rejection.090', term1)) %>%
  mutate(term1 = if_else(xcoord_1 == 4.2, 'acute_rejection.365', term1)) %>%
  mutate(term2 = if_else(xcoord_2 == 6, 'healthy.000', 'other')) %>% 
  mutate(term2 = if_else(xcoord_2 == 0.8, 'no_rejection.000', term2)) %>% 
  mutate(term2 = if_else(xcoord_2 == 1.8, 'no_rejection.007', term2)) %>% 
  mutate(term2 = if_else(xcoord_2 == 2.8, 'no_rejection.090', term2)) %>% 
  mutate(term2 = if_else(xcoord_2 == 3.8, 'no_rejection.365', term2)) %>% 
  mutate(term2 = if_else(xcoord_2 == 5, 'acute_rejection.biopsy', term2)) %>% 
  mutate(term2 = if_else(xcoord_2 == 1.2, 'acute_rejection.000', term2)) %>% 
  mutate(term2 = if_else(xcoord_2 == 2.2, 'acute_rejection.007', term2)) %>%
  mutate(term2 = if_else(xcoord_2 == 3.2, 'acute_rejection.090', term2)) %>%
  mutate(term2 = if_else(xcoord_2 == 4.2, 'acute_rejection.365', term2))
  
  pair_table$p <- NA

4.7.2.2 Between-subjects comparisons

Open code
set.seed(16)
for (i in 1:17){
  dat_pair <- model_data %>% 
    filter(group_sep == paste(pair_table$term1[i])|
           group_sep == paste(pair_table$term2[i]))
  
  g1 <- dat_pair %>% filter(group_sep == paste(pair_table$term1[i]))
  g2 <- dat_pair %>% filter(group_sep == paste(pair_table$term2[i]))
  
  pair_table$p[i] <- wilcox.test(g1$il36_b_value, g2$il36_b_value, paired=FALSE)$p.value
}

4.7.2.3 Within-subject comparisons

Open code
set.seed(16)
for (i in 18:33){
  dat_pair <- model_data %>% 
    filter(group_sep == paste(pair_table$term1[i]) |
           group_sep == paste(pair_table$term2[i])) %>% 
    select(id, group_sep, il36_b_value) %>% 
    pivot_wider(names_from = group_sep, values_from = il36_b_value) %>% 
    filter(complete.cases(.)) %>% data.frame()
  
  g1 <- dat_pair[,2]
  g2 <- dat_pair[,3]
  
  pair_table$p[i] <- wilcox.test(c(g1), c(g2), paired=TRUE)$p.value
}

pair_table <- pair_table[-c(14:15, 19:20, 22, 25:26, 28, 30:33),]
pair_table$cole <- c(rep("black", 15), rep("blue3", 3), rep("red4", 3))
pair_table$fdr <- p.adjust(pair_table$p, method = 'BH')

4.7.2.4 Resulting table

Open code
## the whole `pair table`
pair_table
##                                           contrast xcoord_1 xcoord_2 anot_coord
## 1                     healthy vs. no rejection D_0      6.0      0.8        3.4
## 2                     healthy vs. no rejection D_7      6.0      1.8        3.9
## 3                    healthy vs. no rejection D_90      6.0      2.8        4.4
## 4                   healthy vs. no rejection D_365      6.0      3.8        4.9
## 5                  healthy vs. acute rejection D_0      6.0      1.2        3.6
## 6                  healthy vs. acute rejection D_7      6.0      2.2        4.1
## 7                 healthy vs. acute rejection D_90      6.0      3.2        4.6
## 8                healthy vs. acute rejection D_365      6.0      4.2        5.1
## 9             healthy vs. acute rejection D_biopsy      6.0      5.0        5.5
## 10        no rejection D_0 vs. acute rejection D_0      0.8      1.2        1.0
## 11        no rejection D_7 vs. acute rejection D_7      1.8      2.2        2.0
## 12      no rejection D_90 vs. acute rejection D_90      2.8      3.2        3.0
## 13    no rejection D_365 vs. acute rejection D_365      3.8      4.2        4.0
## 16  no rejection D_90 vs. acute rejection D_biopsy      2.8      5.0        3.9
## 17 no rejection D_365 vs. acute rejection D_biopsy      3.8      5.0        4.4
## 18           no rejection D_0 vs. no rejection D_7      0.8      1.8        1.3
## 21          no rejection D_7 vs. no rejection D_90      1.8      2.8        2.3
## 23        no rejection D_90 vs. no rejection D_365      2.8      3.8        3.3
## 24     acute rejection D_0 vs. acute rejection D_7      1.2      2.2        1.7
## 27    acute rejection D_7 vs. acute rejection D_90      2.2      3.2        2.7
## 29  acute rejection D_90 vs. acute rejection D_365      3.2      4.2        3.7
##                  term1                  term2            p  cole          fdr
## 1          healthy.000       no_rejection.000 1.507542e-15 black 3.165839e-14
## 2          healthy.000       no_rejection.007 1.250083e-13 black 1.312587e-12
## 3          healthy.000       no_rejection.090 5.134600e-09 black 2.695665e-08
## 4          healthy.000       no_rejection.365 7.018490e-08 black 2.947766e-07
## 5          healthy.000    acute_rejection.000 1.419560e-11 black 9.936919e-11
## 6          healthy.000    acute_rejection.007 1.164937e-06 black 4.077280e-06
## 7          healthy.000    acute_rejection.090 3.199889e-02 black 4.799833e-02
## 8          healthy.000    acute_rejection.365 6.882559e-01 black 6.882559e-01
## 9          healthy.000 acute_rejection.biopsy 3.350608e-01 black 3.518138e-01
## 10    no_rejection.000    acute_rejection.000 1.489642e-01 black 1.747311e-01
## 11    no_rejection.007    acute_rejection.007 2.290071e-02 black 4.007624e-02
## 12    no_rejection.090    acute_rejection.090 8.967787e-04 black 2.354044e-03
## 13    no_rejection.365    acute_rejection.365 1.013818e-03 black 2.365575e-03
## 16    no_rejection.090 acute_rejection.biopsy 5.687729e-03 black 1.085839e-02
## 17    no_rejection.365 acute_rejection.biopsy 2.736817e-02 black 4.421013e-02
## 18    no_rejection.000       no_rejection.007 1.152029e-05 blue3 3.456087e-05
## 21    no_rejection.007       no_rejection.090 3.593050e-02 blue3 5.030269e-02
## 23    no_rejection.090       no_rejection.365 1.755844e-01 blue3 1.940670e-01
## 24 acute_rejection.000    acute_rejection.007 1.390606e-03  red4 2.920273e-03
## 27 acute_rejection.007    acute_rejection.090 5.156805e-02  red4 6.768306e-02
## 29 acute_rejection.090    acute_rejection.365 1.497695e-01  red4 1.747311e-01

## only significant differences
pair_table %>% 
  filter(p<0.05) %>% 
  select(contrast, p, fdr) %>% 
  mutate(star = if_else(p<0.05, '*', '')) %>% 
  mutate(star = if_else(p<0.01, '**', star)) %>% 
  mutate(star = if_else(p<0.001, '***', star)) %>%        
  data.frame()
##                                           contrast            p          fdr
## 1                     healthy vs. no rejection D_0 1.507542e-15 3.165839e-14
## 2                     healthy vs. no rejection D_7 1.250083e-13 1.312587e-12
## 3                    healthy vs. no rejection D_90 5.134600e-09 2.695665e-08
## 4                   healthy vs. no rejection D_365 7.018490e-08 2.947766e-07
## 5                  healthy vs. acute rejection D_0 1.419560e-11 9.936919e-11
## 6                  healthy vs. acute rejection D_7 1.164937e-06 4.077280e-06
## 7                 healthy vs. acute rejection D_90 3.199889e-02 4.799833e-02
## 8         no rejection D_7 vs. acute rejection D_7 2.290071e-02 4.007624e-02
## 9       no rejection D_90 vs. acute rejection D_90 8.967787e-04 2.354044e-03
## 10    no rejection D_365 vs. acute rejection D_365 1.013818e-03 2.365575e-03
## 11  no rejection D_90 vs. acute rejection D_biopsy 5.687729e-03 1.085839e-02
## 12 no rejection D_365 vs. acute rejection D_biopsy 2.736817e-02 4.421013e-02
## 13           no rejection D_0 vs. no rejection D_7 1.152029e-05 3.456087e-05
## 14          no rejection D_7 vs. no rejection D_90 3.593050e-02 5.030269e-02
## 15     acute rejection D_0 vs. acute rejection D_7 1.390606e-03 2.920273e-03
##    star
## 1   ***
## 2   ***
## 3   ***
## 4   ***
## 5   ***
## 6   ***
## 7     *
## 8     *
## 9   ***
## 10   **
## 11   **
## 12    *
## 13  ***
## 14    *
## 15   **

pair_rest <- pair_table %>% 
  filter(p<0.05,
         term1 != 'healthy.000') %>% 
  mutate(star = if_else(p<0.05, '*', '')) %>% 
  mutate(star = if_else(p<0.01, '**', star)) %>% 
  mutate(star = if_else(p<0.001, '***', star)) %>%        
  data.frame()

Healthy does differ from all but acute rejection during biopsy and D365

4.7.3 Visualization

Open code

## plot
plotos <- data_long %>% 
  filter(!is.na(il36_b_value)) %>% 
  mutate(group = factor(group, levels = 
                          c("no_rejection", 
                            "acute_rejection",
                            "healthy")),
         time_point = factor(time_point)) %>% 
  mutate(time_point = if_else(group == 'healthy', 'healthy', time_point)) %>% 
  mutate(group_sep = interaction(group, time_point)) %>% 
  
## plotting
  ggplot(aes(x=time_point, y=il36_b_value)) +
  geom_boxplot(aes(fill=group, group = group_sep), outlier.shape = NA, 
               size=0.5,position = position_dodge(width = 0.84), color='black') +
  labs(x = "Time post TX", y = expression("IL-36" * beta * " (pg/ml)")) +
  scale_x_discrete(labels = c("Before TX", "7 days", "3 months", "365 days",
                              "Biopsy", "Healthy")) +
  theme(axis.text = element_text(size = 11),
        axis.title = element_text(size = 12),
        legend.text = element_text(size = 11),
        legend.title = element_text(size = 12)) +
  scale_fill_manual(values = c("no_rejection" = "skyblue2",
                               "acute_rejection" = "coral",
                               "healthy" = "darkolivegreen3"), 
                    labels = c("no rejection", "acute rejection", "healthy")) +
    coord_cartesian(ylim = c(0, 15.5)) +
  annotate("text", x = 6, y = 5, label = "#", size = 7) 

pair_rest$y <-  c(9.9,  7, 6.4,  9,  
                  8.1, 15.5, 12.5, 11.5)

plotos <- plotos + geom_segment(data = pair_rest, 
                                aes(x = xcoord_1, xend = xcoord_2, y = y, yend = y),
                                color = pair_rest$cole,
                                linetype = "solid", size = 0.4) 
plot_il36_b <- plotos + annotate("text", x = pair_rest$anot_coord, y = pair_rest$y+0.15, 
                            label = pair_rest$star, size = 7, color=pair_rest$cole) 
plot_il36_b

Open code

plotac <- 'plot_il36_b'

path = paste0('gitignore/figures/',plotac, '.eps')
if(file.exists(path) == FALSE){
  ggsave(path, 
         plot = get(plotac), width = 7.5, height = 5.6, units = "in")
}

5 Correlation of ILs and renal function markers

5.1 Simple correlation matrix based on patient data

Open code
tr_cor <- patient_table %>%
   filter(group != 'healthy') %>% 
  select(egfr_mean:il36_b_mean) 


cor.mtest(tr_cor, conf.level = 0.95)
## $p
##                    egfr_mean creatinine_mean   il1_a_mean   il1_b_mean
## egfr_mean       0.000000e+00    1.051934e-16 5.951765e-01 2.926421e-01
## creatinine_mean 1.051934e-16    0.000000e+00 9.236792e-01 9.987916e-01
## il1_a_mean      5.951765e-01    9.236792e-01 0.000000e+00 5.817931e-18
## il1_b_mean      2.926421e-01    9.987916e-01 5.817931e-18 0.000000e+00
## il1_ra_mean     7.295765e-01    8.165862e-01 4.288839e-15 2.316736e-11
## il18_mean       8.588608e-01    7.712372e-01 1.680311e-15 7.659848e-14
## il18_bp_mean    1.884867e-01    2.505809e-01 3.841527e-01 7.085025e-01
## il18_free_mean  6.647605e-01    6.290418e-01 3.949705e-15 1.055580e-11
## il36_b_mean     2.494984e-01    3.849128e-01 9.302473e-05 8.379317e-06
##                  il1_ra_mean    il18_mean il18_bp_mean il18_free_mean
## egfr_mean       7.295765e-01 8.588608e-01    0.1884867   6.647605e-01
## creatinine_mean 8.165862e-01 7.712372e-01    0.2505809   6.290418e-01
## il1_a_mean      4.288839e-15 1.680311e-15    0.3841527   3.949705e-15
## il1_b_mean      2.316736e-11 7.659848e-14    0.7085025   1.055580e-11
## il1_ra_mean     0.000000e+00 2.176954e-20    0.5645638   2.259573e-13
## il18_mean       2.176954e-20 0.000000e+00    0.9768424   6.833531e-85
## il18_bp_mean    5.645638e-01 9.768424e-01    0.0000000   4.524752e-01
## il18_free_mean  2.259573e-13 6.833531e-85    0.4524752   0.000000e+00
## il36_b_mean     2.540206e-02 1.512619e-03    0.3023744   1.849524e-03
##                  il36_b_mean
## egfr_mean       2.494984e-01
## creatinine_mean 3.849128e-01
## il1_a_mean      9.302473e-05
## il1_b_mean      8.379317e-06
## il1_ra_mean     2.540206e-02
## il18_mean       1.512619e-03
## il18_bp_mean    3.023744e-01
## il18_free_mean  1.849524e-03
## il36_b_mean     0.000000e+00
## 
## $lowCI
##                   egfr_mean creatinine_mean il1_a_mean  il1_b_mean il1_ra_mean
## egfr_mean        1.00000000     -0.72213458 -0.1224152 -0.07806251 -0.19582384
## creatinine_mean -0.72213458      1.00000000 -0.1750938 -0.16723131 -0.18640737
## il1_a_mean      -0.12241521     -0.17509383  1.0000000  0.54243007  0.48621354
## il1_b_mean      -0.07806251     -0.16723131  0.5424301  1.00000000  0.39813645
## il1_ra_mean     -0.19582384     -0.18640737  0.4862135  0.39813645  1.00000000
## il18_mean       -0.18191597     -0.14272630  0.4947200  0.45880699  0.58405262
## il18_bp_mean    -0.27455220     -0.06979116 -0.2387838 -0.19815124 -0.21478835
## il18_free_mean  -0.20305699     -0.12649994  0.4869689  0.40705248  0.44800513
## il36_b_mean     -0.06956587     -0.23867100  0.1685782  0.21530828  0.02392036
##                  il18_mean il18_bp_mean il18_free_mean il36_b_mean
## egfr_mean       -0.1819160  -0.27455220     -0.2030570 -0.06956587
## creatinine_mean -0.1427263  -0.06979116     -0.1264999 -0.23867100
## il1_a_mean       0.4947200  -0.23878380      0.4869689  0.16857815
## il1_b_mean       0.4588070  -0.19815124      0.4070525  0.21530828
## il1_ra_mean      0.5840526  -0.21478835      0.4480051  0.02392036
## il18_mean        1.0000000  -0.16467977      0.9574656  0.10512859
## il18_bp_mean    -0.1646798   1.00000000     -0.2291107 -0.07985789
## il18_free_mean   0.9574656  -0.22911074      1.0000000  0.10003378
## il36_b_mean      0.1051286  -0.07985789      0.1000338  1.00000000
## 
## $uppCI
##                   egfr_mean creatinine_mean il1_a_mean il1_b_mean il1_ra_mean
## egfr_mean        1.00000000     -0.51881561 0.21111821  0.2535022   0.1380994
## creatinine_mean -0.51881561      1.00000000 0.15909384  0.1669784   0.1476734
## il1_a_mean       0.21111821      0.15909384 1.00000000  0.7374956   0.7005925
## il1_b_mean       0.25350222      0.16697836 0.73749557  1.0000000   0.6403732
## il1_ra_mean      0.13809944      0.14767335 0.70059252  0.6403732   1.0000000
## il18_mean        0.15221790      0.19128075 0.70625117  0.6821760   0.7640880
## il18_bp_mean     0.05553595      0.26126805 0.09361479  0.1357235   0.1186266
## il18_free_mean   0.13070273      0.20715068 0.70109612  0.6466077   0.6748387
## il36_b_mean      0.26147898      0.09373336 0.46805481  0.5050816   0.3463574
##                 il18_mean il18_bp_mean il18_free_mean il36_b_mean
## egfr_mean       0.1522179   0.05553595      0.1307027  0.26147898
## creatinine_mean 0.1912807   0.26126805      0.2071507  0.09373336
## il1_a_mean      0.7062512   0.09361479      0.7010961  0.46805481
## il1_b_mean      0.6821760   0.13572347      0.6466077  0.50508160
## il1_ra_mean     0.7640880   0.11862657      0.6748387  0.34635737
## il18_mean       1.0000000   0.16952788      0.9781094  0.41603888
## il18_bp_mean    0.1695279   1.00000000      0.1037483  0.25181091
## il18_free_mean  0.9781094   0.10374828      1.0000000  0.41177200
## il36_b_mean     0.4160389   0.25181091      0.4117720  1.00000000

tr_cor <- cor(tr_cor, method='spearman', 
              use = 'pairwise.complete.obs') 


corrplot(tr_cor, addCoef.col = 'black',tl.col = "white")
text(1:9, 9.9, expression("eGFR", "Creatinine", "IL-1" * alpha, 
                           "IL-1" * beta, "IL-1 RA", "IL-18", "IL-18 BP",
               "IL-18 (free)",  "IL-36" * beta))

text(-0.1, 9:1,  expression("eGFR", "Creatinine", "IL-1" * alpha, 
                           "IL-1" * beta, "IL-1 RA", "IL-18", "IL-18 BP",
               "IL-18 (free)",  "IL-1" * beta))

Open code


plotac <- 'cormat'

path = paste0('gitignore/figures/',plotac, '.eps')
if(file.exists(path) == FALSE){
  postscript(path, horizontal = FALSE, onefile = FALSE, paper = "special", height = 9, width = 10)
  corrplot(tr_cor, addCoef.col = 'black',tl.col = "white")
  
  text(1:9, 9.9, expression("eGFR", "Creatinine", "IL-1" * alpha, 
                           "IL-1" * beta, "IL-1 RA", "IL-18", "IL-18 BP",
                           "IL-18 (free)",  "IL-36" * beta))
  text(-0.1, 9:1,  expression("eGFR", "Creatinine", "IL-1" * alpha, 
                           "IL-1" * beta, "IL-1 RA", "IL-18", "IL-18 BP",
                           "IL-18 (free)",  "IL-1" * beta))
  
  dev.off()
}

There is not any significant correlation between interleukins and markers of renal function. At least modest (but still not statistically significant) correlation is for interleukin-18BP.

5.2 Adjsuting IL-18BP model for renal function

To further validate that renal functions does not play an important role for above-shown findings, we will re-fit mixed-effects model adjusting also for the effect of renal function. We will do it only for IL-18BP where modest correlation between average values of renal markers and IL-18BP levels was found.

5.2.1 Adjustment for EGFR

Open code
model_data <- data_long %>% 
  filter(!is.na(il18_bp_value))

## Complex models (incuding healthy and biopsy data)
model_il18_bp <-  lmer(log10(il18_bp_value) ~ 
                       group_sep +
                       (1|id), data = model_data, REML = FALSE)

model_il18_bp_adjEGFR <-  lmer(log10(il18_bp_value) ~ log2(egfr) +
                       group_sep +
                       (1|id), data = model_data, REML = FALSE)

model_il18_bp_adjEGFR_REML <-  lmer(log10(il18_bp_value) ~ log2(egfr) +
                       group_sep +
                       (1|id), data = model_data, REML = TRUE)

Anova(model_il18_bp_adjEGFR_REML, type=2, test.statistic='F')
## Analysis of Deviance Table (Type II Wald F tests with Kenward-Roger df)
## 
## Response: log10(il18_bp_value)
##                 F Df Df.res  Pr(>F)  
## log2(egfr) 4.1797  1 548.12 0.04139 *
## group_sep  1.1801  9 498.68 0.30537  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(model_il18_bp_adjEGFR_REML)
## Linear mixed model fit by REML ['lmerMod']
## Formula: log10(il18_bp_value) ~ log2(egfr) + group_sep + (1 | id)
##    Data: model_data
## 
## REML criterion at convergence: -480.6
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -10.0462  -0.3197   0.0347   0.3233   4.7484 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  id       (Intercept) 0.005865 0.07658 
##  Residual             0.018816 0.13717 
## Number of obs: 577, groups:  id, 169
## 
## Fixed effects:
##                                  Estimate Std. Error t value
## (Intercept)                      3.561762   0.035765  99.587
## log2(egfr)                      -0.017083   0.008320  -2.053
## group_sephealthy.000            -0.105218   0.047754  -2.203
## group_sepno_rejection.000        0.003296   0.029591   0.111
## group_sepacute_rejection.007    -0.033490   0.033041  -1.014
## group_sepno_rejection.007       -0.018781   0.032526  -0.577
## group_sepacute_rejection.090    -0.077695   0.037305  -2.083
## group_sepno_rejection.090       -0.061624   0.037756  -1.632
## group_sepacute_rejection.365    -0.047273   0.038642  -1.223
## group_sepno_rejection.365       -0.072861   0.038289  -1.903
## group_sepacute_rejection.biopsy -0.025504   0.036839  -0.692
## 
## Correlation of Fixed Effects:
##              (Intr) lg2(g) g_.000 g__.000 grp_spc_.007 grp_spn_.007
## log2(egfr)    0.723                                                
## grp_sph.000  -0.805 -0.619                                         
## grp_sp_.000  -0.566  0.015  0.423                                  
## grp_spc_.007 -0.703 -0.414  0.559  0.482                           
## grp_spn_.007 -0.827 -0.418  0.652  0.693   0.617                   
## grp_spc_.090 -0.769 -0.569  0.620  0.424   0.623        0.631      
## grp_spn_.090 -0.894 -0.612  0.717  0.593   0.636        0.804      
## grp_spc_.365 -0.755 -0.565  0.609  0.410   0.609        0.617      
## grp_spn_.365 -0.893 -0.619  0.717  0.584   0.633        0.799      
## grp_spct_r.  -0.623 -0.365  0.495  0.428   0.539        0.547      
##              grp_spc_.090 grp_spn_.090 grp_spc_.365 grp_spn_.365
## log2(egfr)                                                      
## grp_sph.000                                                     
## grp_sp_.000                                                     
## grp_spc_.007                                                    
## grp_spn_.007                                                    
## grp_spc_.090                                                    
## grp_spn_.090  0.687                                             
## grp_spc_.365  0.653        0.674                                
## grp_spn_.365  0.686        0.845        0.673                   
## grp_spct_r.   0.552        0.563        0.535        0.561
AIC(model_il18_bp, model_il18_bp_adjEGFR)
##                       df       AIC
## model_il18_bp         12 -519.0147
## model_il18_bp_adjEGFR 13 -521.2798
BIC(model_il18_bp, model_il18_bp_adjEGFR)
##                       df       BIC
## model_il18_bp         12 -466.7206
## model_il18_bp_adjEGFR 13 -464.6278


## Patient-only, planned-measures-only models
model_data <- data_long %>% 
  filter(!is.na(il18_bp_value),
         group != 'healthy',
         time_point != 'biopsy')

model_il18_bp <-  lmer(log10(il18_bp_value) ~ 
                       group*time_point +
                       (1|id), data = model_data, REML = FALSE)

model_il18_bp_adjEGFR <-  lmer(log10(il18_bp_value) ~ log2(egfr) +
                       group*time_point +
                       (1|id), data = model_data, REML = FALSE)

model_il18_bp_adjEGFR_REML <-  lmer(log10(il18_bp_value) ~ log2(egfr) +
                       group*time_point +
                       (1|id), data = model_data, REML = TRUE)

Anova(model_il18_bp_adjEGFR_REML, type=2, test.statistic='F')
## Analysis of Deviance Table (Type II Wald F tests with Kenward-Roger df)
## 
## Response: log10(il18_bp_value)
##                       F Df Df.res  Pr(>F)  
## log2(egfr)       4.5016  1 494.37 0.03436 *
## group            0.0251  1 136.79 0.87436  
## time_point       1.9146  3 427.44 0.12648  
## group:time_point 0.4849  3 383.94 0.69299  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(model_il18_bp_adjEGFR_REML)
## Linear mixed model fit by REML ['lmerMod']
## Formula: log10(il18_bp_value) ~ log2(egfr) + group * time_point + (1 |      id)
##    Data: model_data
## 
## REML criterion at convergence: -392.1
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -9.6297 -0.3042  0.0364  0.3376  4.5436 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  id       (Intercept) 0.006409 0.08006 
##  Residual             0.020436 0.14295 
## Number of obs: 518, groups:  id, 138
## 
## Fixed effects:
##                                     Estimate Std. Error t value
## (Intercept)                         3.558653   0.033042 107.700
## log2(egfr)                         -0.019109   0.008967  -2.131
## groupacute_rejection               -0.003101   0.030865  -0.100
## time_point007                      -0.018658   0.025819  -0.723
## time_point090                      -0.059186   0.033195  -1.783
## time_point365                      -0.070282   0.033893  -2.074
## groupacute_rejection:time_point007 -0.011589   0.037691  -0.307
## groupacute_rejection:time_point090 -0.013485   0.038579  -0.350
## groupacute_rejection:time_point365  0.029127   0.039797   0.732
## 
## Correlation of Fixed Effects:
##             (Intr) lg2(g) grpct_ tm_007 tm_090 tm_365 g_:_00 g_:_09
## log2(egfr)   0.858                                                 
## grpct_rjctn -0.296 -0.016                                          
## time_pnt007 -0.761 -0.586  0.286                                   
## time_pnt090 -0.856 -0.764  0.227  0.705                            
## time_pnt365 -0.855 -0.768  0.223  0.702  0.783                     
## grpct_:_007  0.186  0.011 -0.635 -0.456 -0.184 -0.181              
## grpct_:_090  0.230  0.067 -0.622 -0.260 -0.409 -0.220  0.509       
## grpct_:_365  0.219  0.061 -0.604 -0.250 -0.213 -0.396  0.494  0.486
AIC(model_il18_bp, model_il18_bp_adjEGFR)
##                       df       AIC
## model_il18_bp         10 -422.7043
## model_il18_bp_adjEGFR 11 -425.2819
BIC(model_il18_bp, model_il18_bp_adjEGFR)
##                       df       BIC
## model_il18_bp         10 -380.2045
## model_il18_bp_adjEGFR 11 -378.5322

Inclusion of EGFR improves the fit noticeably

5.2.2 Adjustment for creatinine

Open code


## Complex models (including healthy and biopsy data)

model_data <- data_long %>% 
  filter(!is.na(il18_bp_value))

model_il18_bp <-  lmer(log10(il18_bp_value) ~ 
                       group_sep +
                       (1|id), data = model_data, REML = FALSE)

model_il18_bp_adjCRE <-  lmer(log2(il18_bp_value) ~ log2(creatinine) +
                       group_sep +
                       (1|id), data = model_data, REML = FALSE)

model_il18_bp_adjCRE_REML <-  lmer(log10(il18_bp_value) ~ log2(creatinine) +
                       group_sep +
                       (1|id), data = model_data, REML = TRUE)

Anova(model_il18_bp_adjCRE_REML, type=2, test.statistic='F')
## Analysis of Deviance Table (Type II Wald F tests with Kenward-Roger df)
## 
## Response: log10(il18_bp_value)
##                       F Df Df.res  Pr(>F)  
## log2(creatinine) 4.4601  1 535.30 0.03516 *
## group_sep        1.1852  9 499.12 0.30206  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(model_il18_bp_adjCRE_REML)
## Linear mixed model fit by REML ['lmerMod']
## Formula: log10(il18_bp_value) ~ log2(creatinine) + group_sep + (1 | id)
##    Data: model_data
## 
## REML criterion at convergence: -481.2
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -10.0442  -0.3192   0.0356   0.3372   4.7635 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  id       (Intercept) 0.005832 0.07637 
##  Residual             0.018823 0.13720 
## Number of obs: 577, groups:  id, 169
## 
## Fixed effects:
##                                  Estimate Std. Error t value
## (Intercept)                      3.419216   0.095489  35.808
## log2(creatinine)                 0.020937   0.009871   2.121
## group_sephealthy.000            -0.104120   0.047477  -2.193
## group_sepno_rejection.000        0.003811   0.029573   0.129
## group_sepacute_rejection.007    -0.033271   0.032910  -1.011
## group_sepno_rejection.007       -0.017879   0.032510  -0.550
## group_sepacute_rejection.090    -0.077088   0.037089  -2.078
## group_sepno_rejection.090       -0.060389   0.037651  -1.604
## group_sepacute_rejection.365    -0.046441   0.038478  -1.207
## group_sepno_rejection.365       -0.071398   0.038235  -1.867
## group_sepacute_rejection.biopsy -0.025018   0.036770  -0.680
## 
## Correlation of Fixed Effects:
##              (Intr) lg2(c) g_.000 g__.000 grp_spc_.007 grp_spn_.007
## log2(crtnn)  -0.966                                                
## grp_sph.000  -0.727  0.614                                         
## grp_sp_.000  -0.210 -0.006  0.431                                  
## grp_spc_.007 -0.544  0.405  0.554  0.488                           
## grp_spn_.007 -0.600  0.418  0.652  0.696   0.616                   
## grp_spc_.090 -0.677  0.561  0.616  0.432   0.619        0.631      
## grp_spn_.090 -0.758  0.610  0.715  0.600   0.632        0.804      
## grp_spc_.365 -0.671  0.560  0.606  0.417   0.605        0.617      
## grp_spn_.365 -0.764  0.618  0.715  0.590   0.630        0.799      
## grp_spct_r.  -0.483  0.360  0.492  0.433   0.537        0.546      
##              grp_spc_.090 grp_spn_.090 grp_spc_.365 grp_spn_.365
## log2(crtnn)                                                     
## grp_sph.000                                                     
## grp_sp_.000                                                     
## grp_spc_.007                                                    
## grp_spn_.007                                                    
## grp_spc_.090                                                    
## grp_spn_.090  0.684                                             
## grp_spc_.365  0.649        0.672                                
## grp_spn_.365  0.684        0.844        0.671                   
## grp_spct_r.   0.549        0.561        0.533        0.559
AIC(model_il18_bp, model_il18_bp_adjCRE)
##                      df       AIC
## model_il18_bp        12 -519.0147
## model_il18_bp_adjCRE 13  863.8699
BIC(model_il18_bp, model_il18_bp_adjCRE)
##                      df       BIC
## model_il18_bp        12 -466.7206
## model_il18_bp_adjCRE 13  920.5219


## Patient-only, planned-measures-only models
model_data <- data_long %>% 
  filter(!is.na(il18_bp_value),
         group != 'healthy',
         time_point != 'biopsy')

model_il18_bp <-  lmer(log10(il18_bp_value) ~ 
                       group*time_point +
                       (1|id), data = model_data, REML = FALSE)

model_il18_bp_adjEGFR <-  lmer(log10(il18_bp_value) ~ log2(egfr) +
                       group*time_point +
                       (1|id), data = model_data, REML = FALSE)

model_il18_bp_adjEGFR_REML <-  lmer(log10(il18_bp_value) ~ log2(egfr) +
                       group*time_point +
                       (1|id), data = model_data, REML = TRUE)

Anova(model_il18_bp_adjEGFR_REML, type=2, test.statistic='F')
## Analysis of Deviance Table (Type II Wald F tests with Kenward-Roger df)
## 
## Response: log10(il18_bp_value)
##                       F Df Df.res  Pr(>F)  
## log2(egfr)       4.5016  1 494.37 0.03436 *
## group            0.0251  1 136.79 0.87436  
## time_point       1.9146  3 427.44 0.12648  
## group:time_point 0.4849  3 383.94 0.69299  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
AIC(model_il18_bp, model_il18_bp_adjEGFR)
##                       df       AIC
## model_il18_bp         10 -422.7043
## model_il18_bp_adjEGFR 11 -425.2819
BIC(model_il18_bp, model_il18_bp_adjEGFR)
##                       df       BIC
## model_il18_bp         10 -380.2045
## model_il18_bp_adjEGFR 11 -378.5322

The analysis shows that when renal function are accounted for (included as a covariate to the mixed-effects model), there is no remaining variability explainable by other factors such as group [acute rejection/no rejection/healthy], time_point and group:timepoint interaction. It suggests that IL-18BP might be driven mainly with renal function and its change over time whereas the effects of group and timepoint etc may be indirect.

5.3 Adjusted free IL-18 model

Given that IL-18BP is affected with renal function, and the IL18-BP affects level of other forms of IL-18 (including free IL-18), we will fit model explaining the IL-18 levels but simultaneously adjusting for renal functions

5.3.1 Adjustment for EGFR

Open code
model_data <- data_long %>% 
  filter(!is.na(il18_free))

## Complex models (incuding healthy and biopsy data)
model_il18_free <-  lmer(log10(il18_free) ~ 
                       group_sep +
                       (1|id), data = model_data, REML = FALSE)

model_il18_free_adjEGFR <-  lmer(log10(il18_free) ~ log2(egfr) +
                       group_sep +
                       (1|id), data = model_data, REML = FALSE)

model_il18_free_adjEGFR_REML <-  lmer(log10(il18_free) ~ log2(egfr) +
                       group_sep +
                       (1|id), data = model_data, REML = TRUE)

Anova(model_il18_free_adjEGFR_REML, type=2, test.statistic='F')
## Analysis of Deviance Table (Type II Wald F tests with Kenward-Roger df)
## 
## Response: log10(il18_free)
##                  F Df Df.res Pr(>F)    
## log2(egfr)  0.3356  1 454.53 0.5627    
## group_sep  18.1014  9 408.33 <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
AIC(model_il18_free, model_il18_free_adjEGFR)
##                         df      AIC
## model_il18_free         12 227.9601
## model_il18_free_adjEGFR 13 229.6135
BIC(model_il18_free, model_il18_free_adjEGFR)
##                         df      BIC
## model_il18_free         12 278.0706
## model_il18_free_adjEGFR 13 283.8997

## contrasts
em_il18_free <- emmeans(model_il18_free_adjEGFR_REML, specs = pairwise ~ group_sep, 
              adjust = 'none', type = 'response')

em_il18_free_cont <- data.frame(em_il18_free$contrasts)[c(
  1:3, 10:17, 19, 25, 26, 32, 36, 37, 39, 42, 43, 45
),]

as_tibble(em_il18_free_cont) %>% 
  filter(p.value<0.05) %>% data.frame()
##                                     contrast     ratio         SE       df null
## 1          acute_rejection.000 / healthy.000 2.3315782 0.52034857 435.4140    1
## 2     acute_rejection.000 / no_rejection.000 0.6793740 0.09354166 425.5437    1
## 3  acute_rejection.000 / acute_rejection.007 1.7691762 0.27220804 368.0639    1
## 4             healthy.000 / no_rejection.000 0.2913794 0.06007420 433.2572    1
## 5             healthy.000 / no_rejection.007 0.6455614 0.10791291 418.4778    1
## 6          healthy.000 / acute_rejection.090 0.3053545 0.05358004 416.1816    1
## 7             healthy.000 / no_rejection.090 0.3248719 0.05650436 443.8935    1
## 8          healthy.000 / acute_rejection.365 0.3794731 0.06838827 424.1798    1
## 9             healthy.000 / no_rejection.365 0.4377587 0.07589687 443.9985    1
## 10      healthy.000 / acute_rejection.biopsy 0.3168494 0.06345138 447.6072    1
## 11       no_rejection.000 / no_rejection.007 2.2155354 0.24958269 407.0643    1
## 12 acute_rejection.007 / acute_rejection.090 0.4024234 0.05650458 337.9530    1
## 13       no_rejection.007 / no_rejection.090 0.5032393 0.06583322 391.8005    1
##      t.ratio      p.value
## 1   3.793201 1.697373e-04
## 2  -2.807677 5.219514e-03
## 3   3.707972 2.410928e-04
## 4  -5.981077 4.642962e-09
## 5  -2.618039 9.164447e-03
## 6  -6.760661 4.660123e-11
## 7  -6.464304 2.685302e-10
## 8  -5.376633 1.255929e-07
## 9  -4.764715 2.566163e-06
## 10 -5.739262 1.755095e-08
## 11  7.061568 7.161177e-12
## 12 -6.482768 3.192028e-10
## 13 -5.249160 2.509957e-07

## Patient-only, planned-measures-only models
model_data <- data_long %>% 
  filter(!is.na(il18_free),
         group != 'healthy',
         time_point != 'biopsy')

model_il18_free <-  lmer(log10(il18_free) ~ 
                       group*time_point +
                       (1|id), data = model_data, REML = FALSE)

model_il18_free_adjEGFR <-  lmer(log10(il18_free) ~ log2(egfr) +
                       group*time_point +
                       (1|id), data = model_data, REML = FALSE)

model_il18_free_adjEGFR_REML <-  lmer(log10(il18_free) ~ log2(egfr) +
                       group*time_point +
                       (1|id), data = model_data, REML = TRUE)

Anova(model_il18_free_adjEGFR_REML, type=2, test.statistic='F')
## Analysis of Deviance Table (Type II Wald F tests with Kenward-Roger df)
## 
## Response: log10(il18_free)
##                        F Df Df.res  Pr(>F)    
## log2(egfr)        0.6772  1 401.95 0.41105    
## group             1.7544  1 127.29 0.18770    
## time_point       37.7663  3 333.88 < 2e-16 ***
## group:time_point  2.8773  3 300.17 0.03633 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
AIC(model_il18_free, model_il18_free_adjEGFR)
##                         df      AIC
## model_il18_free         10 228.2280
## model_il18_free_adjEGFR 11 229.5296
BIC(model_il18_free, model_il18_free_adjEGFR)
##                         df      BIC
## model_il18_free         10 268.6781
## model_il18_free_adjEGFR 11 274.0246

Inclusion of EGFR improves the fit noticeably

5.3.2 Adjustment for creatinine

Open code


## Complex models (including healthy and biopsy data)

model_data <- data_long %>% 
  filter(!is.na(il18_free))

model_il18_free <-  lmer(log10(il18_free) ~ 
                       group_sep +
                       (1|id), data = model_data, REML = FALSE)

model_il18_free_adjCRE <-  lmer(log10(il18_free) ~ log2(creatinine) +
                       group_sep +
                       (1|id), data = model_data, REML = FALSE)

model_il18_free_adjCRE_REML <-  lmer(log10(il18_free) ~ log2(creatinine) +
                       group_sep +
                       (1|id), data = model_data, REML = TRUE)

Anova(model_il18_free_adjCRE_REML, type=2, test.statistic='F')
## Analysis of Deviance Table (Type II Wald F tests with Kenward-Roger df)
## 
## Response: log10(il18_free)
##                        F Df Df.res Pr(>F)    
## log2(creatinine)  0.0002  1 446.24  0.989    
## group_sep        17.8758  9 408.52 <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
AIC(model_il18_free, model_il18_free_adjCRE)
##                        df      AIC
## model_il18_free        12 227.9601
## model_il18_free_adjCRE 13 229.9600
BIC(model_il18_free, model_il18_free_adjCRE)
##                        df      BIC
## model_il18_free        12 278.0706
## model_il18_free_adjCRE 13 284.2462

## contrasts
em_il18_free <- emmeans(model_il18_free_adjCRE_REML, specs = pairwise ~ group_sep, 
              adjust = 'none', type = 'response')

em_il18_free_cont <- data.frame(em_il18_free$contrasts)[c(
  1:3, 10:17, 19, 25, 26, 32, 36, 37, 39, 42, 43, 45
),]

as_tibble(em_il18_free_cont) %>% 
  filter(p.value<0.05) %>% data.frame()
##                                     contrast     ratio         SE       df null
## 1          acute_rejection.000 / healthy.000 2.1453807 0.47593242 431.8715    1
## 2     acute_rejection.000 / no_rejection.000 0.6801029 0.09366840 425.5014    1
## 3  acute_rejection.000 / acute_rejection.007 1.7011840 0.26058869 368.0195    1
## 4             healthy.000 / no_rejection.000 0.3170080 0.06457069 427.5727    1
## 5             healthy.000 / no_rejection.007 0.6751610 0.11222376 415.5566    1
## 6          healthy.000 / acute_rejection.090 0.3125998 0.05485091 415.2023    1
## 7             healthy.000 / no_rejection.090 0.3310768 0.05749415 443.3200    1
## 8          healthy.000 / acute_rejection.365 0.3879380 0.06987391 423.3193    1
## 9             healthy.000 / no_rejection.365 0.4452840 0.07706825 443.5440    1
## 10      healthy.000 / acute_rejection.biopsy 0.3315094 0.06624564 445.6713    1
## 11       no_rejection.000 / no_rejection.007 2.1297915 0.23814782 408.7986    1
## 12 acute_rejection.007 / acute_rejection.090 0.3942228 0.05534894 337.7623    1
## 13       no_rejection.007 / no_rejection.090 0.4903672 0.06410940 391.8145    1
##      t.ratio      p.value
## 1   3.440836 6.363581e-04
## 2  -2.799101 5.357594e-03
## 3   3.468611 5.851130e-04
## 4  -5.640140 3.093812e-08
## 5  -2.363189 1.857801e-02
## 6  -6.627071 1.065540e-10
## 7  -6.365411 4.869105e-10
## 8  -5.257217 2.325020e-07
## 9  -4.674479 3.915784e-06
## 10 -5.525182 5.607303e-08
## 11  6.761236 4.740038e-11
## 12 -6.629901 1.331905e-10
## 13 -5.450621 8.895887e-08


## Patient-only, planned-measures-only models
model_data <- data_long %>% 
  filter(!is.na(il18_free),
         group != 'healthy',
         time_point != 'biopsy')

model_il18_free <-  lmer(log10(il18_free) ~ 
                       group*time_point +
                       (1|id), data = model_data, REML = FALSE)

model_il18_free_adjEGFR <-  lmer(log10(il18_free) ~ log2(egfr) +
                       group*time_point +
                       (1|id), data = model_data, REML = FALSE)

model_il18_free_adjEGFR_REML <-  lmer(log10(il18_free) ~ log2(egfr) +
                       group*time_point +
                       (1|id), data = model_data, REML = TRUE)

Anova(model_il18_free_adjEGFR_REML, type=2, test.statistic='F')
## Analysis of Deviance Table (Type II Wald F tests with Kenward-Roger df)
## 
## Response: log10(il18_free)
##                        F Df Df.res  Pr(>F)    
## log2(egfr)        0.6772  1 401.95 0.41105    
## group             1.7544  1 127.29 0.18770    
## time_point       37.7663  3 333.88 < 2e-16 ***
## group:time_point  2.8773  3 300.17 0.03633 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
AIC(model_il18_free, model_il18_free_adjEGFR)
##                         df      AIC
## model_il18_free         10 228.2280
## model_il18_free_adjEGFR 11 229.5296
BIC(model_il18_free, model_il18_free_adjEGFR)
##                         df      BIC
## model_il18_free         10 268.6781
## model_il18_free_adjEGFR 11 274.0246

Adjustment for renal function does not modify result of the model explaining free IL-18. Markers of renal function do not clearly affect the pattern of difference in free IL-18 levels across groups or time points

What about total IL-18?

5.4 Adjusted total IL-18 model

5.4.1 Adjustment for EGFR

Open code
model_data <- data_long %>% 
  filter(!is.na(il18_value))

## Complex models (incuding healthy and biopsy data)
model_il18_value <-  lmer(log10(il18_value) ~ 
                       group_sep +
                       (1|id), data = model_data, REML = FALSE)

model_il18_value_adjEGFR <-  lmer(log10(il18_value) ~ log2(egfr) +
                       group_sep +
                       (1|id), data = model_data, REML = FALSE)

model_il18_value_adjEGFR_REML <-  lmer(log10(il18_value) ~ log2(egfr) +
                       group_sep +
                       (1|id), data = model_data, REML = TRUE)

Anova(model_il18_value_adjEGFR_REML, type=2, test.statistic='F')
## Analysis of Deviance Table (Type II Wald F tests with Kenward-Roger df)
## 
## Response: log10(il18_value)
##                  F Df Df.res Pr(>F)    
## log2(egfr)  0.0031  1 480.04 0.9556    
## group_sep  20.1532  9 420.06 <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
AIC(model_il18_value, model_il18_value_adjEGFR)
##                          df      AIC
## model_il18_value         12 271.2115
## model_il18_value_adjEGFR 13 273.2083
BIC(model_il18_value, model_il18_value_adjEGFR)
##                          df      BIC
## model_il18_value         12 321.7868
## model_il18_value_adjEGFR 13 327.9982

## contrasts
em_il18_value <- emmeans(model_il18_value_adjEGFR_REML, specs = pairwise ~ group_sep, 
              adjust = 'none', type = 'response')

em_il18_value_cont <- data.frame(em_il18_value$contrasts)[c(
  1:3, 10:17, 19, 25, 26, 32, 36, 37, 39, 42, 43, 45
),]

as_tibble(em_il18_value_cont) %>% 
  filter(p.value<0.05) %>% data.frame()
##                                     contrast     ratio         SE       df null
## 1          acute_rejection.000 / healthy.000 2.7327283 0.59075545 454.8588    1
## 2     acute_rejection.000 / no_rejection.000 0.6588842 0.09351447 431.4629    1
## 3  acute_rejection.000 / acute_rejection.007 1.7879510 0.28001207 374.9000    1
## 4             healthy.000 / no_rejection.000 0.2411086 0.04760871 456.0469    1
## 5          healthy.000 / acute_rejection.007 0.6542732 0.11431825 430.9406    1
## 6             healthy.000 / no_rejection.007 0.5473562 0.08425240 434.6615    1
## 7          healthy.000 / acute_rejection.090 0.2705360 0.04435857 427.5403    1
## 8             healthy.000 / no_rejection.090 0.2766002 0.04474444 467.3297    1
## 9          healthy.000 / acute_rejection.365 0.3280447 0.05555405 439.1956    1
## 10            healthy.000 / no_rejection.365 0.3708407 0.05975896 467.4146    1
## 11      healthy.000 / acute_rejection.biopsy 0.2739963 0.05246917 469.0334    1
## 12       no_rejection.000 / no_rejection.007 2.2701649 0.26136354 414.8281    1
## 13 acute_rejection.007 / acute_rejection.090 0.4134909 0.05939210 342.4858    1
## 14       no_rejection.007 / no_rejection.090 0.5053386 0.06781804 396.7540    1
##      t.ratio      p.value
## 1   4.650339 4.349772e-06
## 2  -2.939560 3.463335e-03
## 3   3.710287 2.383677e-04
## 4  -7.204120 2.433212e-12
## 5  -2.427981 1.559166e-02
## 6  -3.915226 1.048325e-04
## 7  -7.973324 1.423874e-14
## 8  -7.944711 1.466918e-14
## 9  -6.581706 1.328100e-10
## 10 -6.155856 1.608650e-09
## 11 -6.760671 4.093963e-11
## 12  7.121117 4.755671e-12
## 13 -6.148326 2.180103e-09
## 14 -5.085771 5.657638e-07

## Patient-only, planned-measures-only models
model_data <- data_long %>% 
  filter(!is.na(il18_value),
         group != 'healthy',
         time_point != 'biopsy')

model_il18_value <-  lmer(log10(il18_value) ~ 
                       group*time_point +
                       (1|id), data = model_data, REML = FALSE)

model_il18_value_adjEGFR <-  lmer(log10(il18_value) ~ log2(egfr) +
                       group*time_point +
                       (1|id), data = model_data, REML = FALSE)

model_il18_value_adjEGFR_REML <-  lmer(log10(il18_value) ~ log2(egfr) +
                       group*time_point +
                       (1|id), data = model_data, REML = TRUE)

Anova(model_il18_value_adjEGFR_REML, type=2, test.statistic='F')
## Analysis of Deviance Table (Type II Wald F tests with Kenward-Roger df)
## 
## Response: log10(il18_value)
##                        F Df Df.res  Pr(>F)    
## log2(egfr)        0.1924  1 404.93 0.66113    
## group             2.5125  1 127.53 0.11542    
## time_point       38.3866  3 335.55 < 2e-16 ***
## group:time_point  2.9904  3 301.09 0.03128 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
AIC(model_il18_value, model_il18_value_adjEGFR)
##                          df      AIC
## model_il18_value         10 229.1316
## model_il18_value_adjEGFR 11 230.9330
BIC(model_il18_value, model_il18_value_adjEGFR)
##                          df      BIC
## model_il18_value         10 269.6289
## model_il18_value_adjEGFR 11 275.4801

5.4.2 Adjustment for creatinine

Open code


## Complex models (including healthy and biopsy data)

model_data <- data_long %>% 
  filter(!is.na(il18_value))

model_il18_value <-  lmer(log10(il18_value) ~ 
                       group_sep +
                       (1|id), data = model_data, REML = FALSE)

model_il18_value_adjCRE <-  lmer(log10(il18_value) ~ log2(creatinine) +
                       group_sep +
                       (1|id), data = model_data, REML = FALSE)

model_il18_value_adjCRE_REML <-  lmer(log10(il18_value) ~ log2(creatinine) +
                       group_sep +
                       (1|id), data = model_data, REML = TRUE)

Anova(model_il18_value_adjCRE_REML, type=2, test.statistic='F')
## Analysis of Deviance Table (Type II Wald F tests with Kenward-Roger df)
## 
## Response: log10(il18_value)
##                        F Df Df.res Pr(>F)    
## log2(creatinine)  0.2122  1 472.28 0.6453    
## group_sep        19.8897  9 420.37 <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
AIC(model_il18_value, model_il18_value_adjCRE)
##                         df      AIC
## model_il18_value        12 271.2115
## model_il18_value_adjCRE 13 272.9944
BIC(model_il18_value, model_il18_value_adjCRE)
##                         df      BIC
## model_il18_value        12 321.7868
## model_il18_value_adjCRE 13 327.7843

## contrasts
em_il18_value <- emmeans(model_il18_value_adjCRE_REML, specs = pairwise ~ group_sep, 
              adjust = 'none', type = 'response')

em_il18_value_cont <- data.frame(em_il18_value$contrasts)[c(
  1:3, 10:17, 19, 25, 26, 32, 36, 37, 39, 42, 43, 45
),]

as_tibble(em_il18_value_cont) %>% 
  filter(p.value<0.05) %>% data.frame()
##                                     contrast     ratio         SE       df null
## 1          acute_rejection.000 / healthy.000 2.5376497 0.54669353 450.5722    1
## 2     acute_rejection.000 / no_rejection.000 0.6589285 0.09346906 431.8847    1
## 3  acute_rejection.000 / acute_rejection.007 1.7274048 0.26927139 375.1652    1
## 4             healthy.000 / no_rejection.000 0.2596609 0.05075743 449.0891    1
## 5          healthy.000 / acute_rejection.007 0.6807105 0.11911191 429.3393    1
## 6             healthy.000 / no_rejection.007 0.5694223 0.08732941 431.1451    1
## 7          healthy.000 / acute_rejection.090 0.2763401 0.04536043 426.9701    1
## 8             healthy.000 / no_rejection.090 0.2812681 0.04545166 466.7664    1
## 9          healthy.000 / acute_rejection.365 0.3346158 0.05667974 438.4731    1
## 10            healthy.000 / no_rejection.365 0.3763941 0.06056648 466.9900    1
## 11      healthy.000 / acute_rejection.biopsy 0.2852284 0.05460143 467.0554    1
## 12       no_rejection.000 / no_rejection.007 2.1929454 0.25042024 417.2737    1
## 13 acute_rejection.007 / acute_rejection.090 0.4059583 0.05829852 342.4725    1
## 14       no_rejection.007 / no_rejection.090 0.4939535 0.06623078 397.1467    1
##      t.ratio      p.value
## 1   4.322635 1.899106e-05
## 2  -2.940712 3.450561e-03
## 3   3.506627 5.087970e-04
## 4  -6.897932 1.801076e-11
## 5  -2.198047 2.847885e-02
## 6  -3.671850 2.710402e-04
## 7  -7.835185 3.755878e-14
## 8  -7.849520 2.882943e-14
## 9  -6.463122 2.735244e-10
## 10 -6.072363 2.613534e-09
## 11 -6.553107 1.492507e-10
## 12  6.876444 2.250420e-11
## 13 -6.277576 1.040802e-09
## 14 -5.260277 2.357036e-07


## Patient-only, planned-measures-only models
model_data <- data_long %>% 
  filter(!is.na(il18_value),
         group != 'healthy',
         time_point != 'biopsy')

model_il18_value <-  lmer(log10(il18_value) ~ 
                       group*time_point +
                       (1|id), data = model_data, REML = FALSE)

model_il18_value_adjEGFR <-  lmer(log10(il18_value) ~ log2(egfr) +
                       group*time_point +
                       (1|id), data = model_data, REML = FALSE)

model_il18_value_adjEGFR_REML <-  lmer(log10(il18_value) ~ log2(egfr) +
                       group*time_point +
                       (1|id), data = model_data, REML = TRUE)

Anova(model_il18_value_adjEGFR_REML, type=2, test.statistic='F')
## Analysis of Deviance Table (Type II Wald F tests with Kenward-Roger df)
## 
## Response: log10(il18_value)
##                        F Df Df.res  Pr(>F)    
## log2(egfr)        0.1924  1 404.93 0.66113    
## group             2.5125  1 127.53 0.11542    
## time_point       38.3866  3 335.55 < 2e-16 ***
## group:time_point  2.9904  3 301.09 0.03128 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
AIC(model_il18_value, model_il18_value_adjEGFR)
##                          df      AIC
## model_il18_value         10 229.1316
## model_il18_value_adjEGFR 11 230.9330
BIC(model_il18_value, model_il18_value_adjEGFR)
##                          df      BIC
## model_il18_value         10 269.6289
## model_il18_value_adjEGFR 11 275.4801

Adjustment for renal function does not modify the results of the models explaining total IL-18. Markers of renal function do not clearly affect the above-shown patterns in total IL-18 levels and their difference across groups or time points

5.5 Renal function adjusment for other interleukins

5.5.1 IL-1a

Open code
model_data <- data_long %>% 
  filter(!is.na(il1_a_value))

## eGFR
model_il1a_value_adjEGFR <-  lmer(log10(il1_a_value) ~ log10(egfr) +
                       group_sep +
                       (1|id), data = model_data, REML = TRUE)

Anova(model_il1a_value_adjEGFR, type=2, test.statistic='F')
## Analysis of Deviance Table (Type II Wald F tests with Kenward-Roger df)
## 
## Response: log10(il1_a_value)
##                   F Df Df.res Pr(>F)    
## log10(egfr)  0.2315  1 449.16 0.6306    
## group_sep   14.0713  9 424.90 <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(model_il1a_value_adjEGFR)
## Linear mixed model fit by REML ['lmerMod']
## Formula: log10(il1_a_value) ~ log10(egfr) + group_sep + (1 | id)
##    Data: model_data
## 
## REML criterion at convergence: 810.4
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.5708 -0.3324  0.0708  0.5715  3.4984 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  id       (Intercept) 0.05227  0.2286  
##  Residual             0.23896  0.4888  
## Number of obs: 500, groups:  id, 186
## 
## Fixed effects:
##                                 Estimate Std. Error t value
## (Intercept)                      0.58897    0.12574   4.684
## log10(egfr)                      0.04728    0.09776   0.484
## group_sephealthy.000            -1.01199    0.15603  -6.486
## group_sepno_rejection.000        0.01436    0.10248   0.140
## group_sepacute_rejection.007    -0.10732    0.11915  -0.901
## group_sepno_rejection.007       -0.11638    0.11330  -1.027
## group_sepacute_rejection.090    -0.05990    0.13326  -0.450
## group_sepno_rejection.090        0.15554    0.14574   1.067
## group_sepacute_rejection.365    -0.15589    0.13875  -1.123
## group_sepno_rejection.365        0.09132    0.14707   0.621
## group_sepacute_rejection.biopsy -0.08426    0.13179  -0.639
## 
## Correlation of Fixed Effects:
##              (Intr) lg10() g_.000 g__.000 grp_spc_.007 grp_spn_.007
## log10(egfr)   0.729                                                
## grp_sph.000  -0.865 -0.668                                         
## grp_sp_.000  -0.566  0.011  0.456                                  
## grp_spc_.007 -0.716 -0.415  0.611  0.503                           
## grp_spn_.007 -0.831 -0.427  0.704  0.681   0.636                   
## grp_spc_.090 -0.783 -0.564  0.676  0.449   0.625        0.653      
## grp_spn_.090 -0.811 -0.558  0.698  0.527   0.588        0.720      
## grp_spc_.365 -0.764 -0.558  0.661  0.433   0.607        0.635      
## grp_spn_.365 -0.815 -0.569  0.703  0.522   0.590        0.720      
## grp_spct_r.  -0.637 -0.360  0.543  0.456   0.543        0.569      
##              grp_spc_.090 grp_spn_.090 grp_spc_.365 grp_spn_.365
## log10(egfr)                                                     
## grp_sph.000                                                     
## grp_sp_.000                                                     
## grp_spc_.007                                                    
## grp_spn_.007                                                    
## grp_spc_.090                                                    
## grp_spn_.090  0.635                                             
## grp_spc_.365  0.652        0.620                                
## grp_spn_.365  0.638        0.714        0.623                   
## grp_spct_r.   0.557        0.524        0.538        0.525

## creatinine
model_il1a_value_adjCRE <-  lmer(log10(il1_a_value) ~ log10(creatinine) + group_sep +
                       (1|id), data = model_data, REML = TRUE)

Anova(model_il1a_value_adjCRE, type=2, test.statistic='F')
## Analysis of Deviance Table (Type II Wald F tests with Kenward-Roger df)
## 
## Response: log10(il1_a_value)
##                         F Df Df.res Pr(>F)    
## log10(creatinine)  0.1549  1 439.29 0.6941    
## group_sep         14.0312  9 424.92 <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(model_il1a_value_adjCRE)
## Linear mixed model fit by REML ['lmerMod']
## Formula: log10(il1_a_value) ~ log10(creatinine) + group_sep + (1 | id)
##    Data: model_data
## 
## REML criterion at convergence: 810.1
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.5789 -0.3275  0.0716  0.5660  3.5026 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  id       (Intercept) 0.0525   0.2291  
##  Residual             0.2388   0.4887  
## Number of obs: 500, groups:  id, 186
## 
## Fixed effects:
##                                 Estimate Std. Error t value
## (Intercept)                      0.67302    0.33586   2.004
## log10(creatinine)               -0.04557    0.11522  -0.396
## group_sephealthy.000            -1.00244    0.15545  -6.449
## group_sepno_rejection.000        0.01378    0.10249   0.134
## group_sepacute_rejection.007    -0.10242    0.11857  -0.864
## group_sepno_rejection.007       -0.11210    0.11330  -0.989
## group_sepacute_rejection.090    -0.05265    0.13237  -0.398
## group_sepno_rejection.090        0.16282    0.14555   1.119
## group_sepacute_rejection.365    -0.14863    0.13810  -1.076
## group_sepno_rejection.365        0.09869    0.14704   0.671
## group_sepacute_rejection.biopsy -0.07987    0.13153  -0.607
## 
## Correlation of Fixed Effects:
##              (Intr) lg10() g_.000 g__.000 grp_spc_.007 grp_spn_.007
## lg10(crtnn)  -0.967                                                
## grp_sph.000  -0.785  0.665                                         
## grp_sp_.000  -0.216  0.001  0.465                                  
## grp_spc_.007 -0.547  0.405  0.606  0.510                           
## grp_spn_.007 -0.607  0.426  0.704  0.686   0.634                   
## grp_spc_.090 -0.678  0.556  0.672  0.459   0.620        0.652      
## grp_spn_.090 -0.689  0.556  0.697  0.534   0.584        0.720      
## grp_spc_.365 -0.668  0.552  0.658  0.441   0.603        0.634      
## grp_spn_.365 -0.699  0.568  0.702  0.529   0.586        0.720      
## grp_spct_r.  -0.484  0.356  0.540  0.461   0.540        0.568      
##              grp_spc_.090 grp_spn_.090 grp_spc_.365 grp_spn_.365
## lg10(crtnn)                                                     
## grp_sph.000                                                     
## grp_sp_.000                                                     
## grp_spc_.007                                                    
## grp_spn_.007                                                    
## grp_spc_.090                                                    
## grp_spn_.090  0.632                                             
## grp_spc_.365  0.648        0.617                                
## grp_spn_.365  0.636        0.714        0.621                   
## grp_spct_r.   0.555        0.522        0.536        0.523

## eGFR, simpler model (biopsy and healthy people not included)
model_data <- data_long %>% 
  filter(!is.na(il1_a_value)) %>% 
  filter(group != 'healthy',
         time_point != 'biopsy')

model_il1a_value_adjEGFR_simple <-  lmer(log10(il1_a_value) ~ log10(egfr) +
                       group*time_point+
                       (1|id), data = model_data, REML = TRUE)

Anova(model_il1a_value_adjEGFR_simple , type=2, test.statistic='F')
## Analysis of Deviance Table (Type II Wald F tests with Kenward-Roger df)
## 
## Response: log10(il1_a_value)
##                       F Df Df.res  Pr(>F)  
## log10(egfr)      0.3445  1 385.57 0.55756  
## group            1.7365  1 124.71 0.19000  
## time_point       2.4095  3 342.53 0.06686 .
## group:time_point 1.5744  3 306.30 0.19555  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(model_il1a_value_adjEGFR_simple)
## Linear mixed model fit by REML ['lmerMod']
## Formula: log10(il1_a_value) ~ log10(egfr) + group * time_point + (1 |      id)
##    Data: model_data
## 
## REML criterion at convergence: 692.5
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.5612 -0.2624  0.1099  0.5727  2.0900 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  id       (Intercept) 0.05633  0.2373  
##  Residual             0.24022  0.4901  
## Number of obs: 424, groups:  id, 138
## 
## Fixed effects:
##                                    Estimate Std. Error t value
## (Intercept)                         0.61596    0.11251   5.475
## log10(egfr)                         0.06058    0.10266   0.590
## groupacute_rejection               -0.01183    0.10342  -0.114
## time_point007                      -0.13748    0.08838  -1.556
## time_point090                       0.12951    0.12952   1.000
## time_point365                       0.06497    0.13119   0.495
## groupacute_rejection:time_point007  0.01977    0.13014   0.152
## groupacute_rejection:time_point090 -0.20219    0.14677  -1.378
## groupacute_rejection:time_point365 -0.23632    0.15074  -1.568
## 
## Correlation of Fixed Effects:
##             (Intr) lg10() grpct_ tm_007 tm_090 tm_365 g_:_00 g_:_09
## log10(egfr)  0.866                                                 
## grpct_rjctn -0.282 -0.013                                          
## time_pnt007 -0.766 -0.588  0.287                                   
## time_pnt090 -0.754 -0.668  0.199  0.616                            
## time_pnt365 -0.761 -0.678  0.197  0.619  0.637                     
## grpct_:_007  0.175  0.001 -0.653 -0.445 -0.152 -0.150              
## grpct_:_090  0.201  0.053 -0.582 -0.228 -0.524 -0.199  0.461       
## grpct_:_365  0.194  0.050 -0.568 -0.221 -0.194 -0.504  0.450  0.428

There is sign that renal function affect also IL-1b, but it seems to be driven mainly by the difference of healthy subject. Analysis taking into account only planned measurements from patients does not show any indication that renal function affects the IL-1b levels.

5.5.2 IL-1b

Open code
model_data <- data_long %>% 
  filter(!is.na(il1_b_value))

## eGFR
model_il1a_value_adjEGFR <-  lmer(log10(il1_b_value) ~ log2(egfr) +
                       group_sep +
                       (1|id), data = model_data, REML = TRUE)

Anova(model_il1a_value_adjEGFR, type=2, test.statistic='F')
## Analysis of Deviance Table (Type II Wald F tests with Kenward-Roger df)
## 
## Response: log10(il1_b_value)
##                  F Df Df.res  Pr(>F)    
## log2(egfr)  4.0103  1 456.69 0.04581 *  
## group_sep  61.0774  9 423.97 < 2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(model_il1a_value_adjEGFR)
## Linear mixed model fit by REML ['lmerMod']
## Formula: log10(il1_b_value) ~ log2(egfr) + group_sep + (1 | id)
##    Data: model_data
## 
## REML criterion at convergence: -505.3
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -6.2656 -0.4852 -0.0886  0.2825  7.0740 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  id       (Intercept) 0.00395  0.06285 
##  Residual             0.01585  0.12591 
## Number of obs: 500, groups:  id, 186
## 
## Fixed effects:
##                                  Estimate Std. Error t value
## (Intercept)                      1.208252   0.032778  36.862
## log2(egfr)                       0.015444   0.007673   2.013
## group_sephealthy.000            -0.653446   0.040678 -16.064
## group_sepno_rejection.000        0.048028   0.026709   1.798
## group_sepacute_rejection.007    -0.076338   0.030761  -2.482
## group_sepno_rejection.007       -0.038950   0.029533  -1.319
## group_sepacute_rejection.090    -0.080306   0.034476  -2.329
## group_sepno_rejection.090       -0.118256   0.037937  -3.117
## group_sepacute_rejection.365    -0.099887   0.035884  -2.784
## group_sepno_rejection.365       -0.135437   0.038283  -3.538
## group_sepacute_rejection.biopsy -0.071200   0.034046  -2.091
## 
## Correlation of Fixed Effects:
##              (Intr) lg2(g) g_.000 g__.000 grp_spc_.007 grp_spn_.007
## log2(egfr)    0.730                                                
## grp_sph.000  -0.865 -0.669                                         
## grp_sp_.000  -0.566  0.011  0.455                                  
## grp_spc_.007 -0.714 -0.419  0.609  0.496                           
## grp_spn_.007 -0.831 -0.427  0.704  0.686   0.632                   
## grp_spc_.090 -0.781 -0.569  0.675  0.443   0.627        0.649      
## grp_spn_.090 -0.811 -0.558  0.699  0.531   0.586        0.724      
## grp_spc_.365 -0.762 -0.562  0.660  0.426   0.609        0.631      
## grp_spn_.365 -0.816 -0.569  0.703  0.526   0.588        0.725      
## grp_spct_r.  -0.635 -0.364  0.541  0.450   0.545        0.566      
##              grp_spc_.090 grp_spn_.090 grp_spc_.365 grp_spn_.365
## log2(egfr)                                                      
## grp_sph.000                                                     
## grp_sp_.000                                                     
## grp_spc_.007                                                    
## grp_spn_.007                                                    
## grp_spc_.090                                                    
## grp_spn_.090  0.634                                             
## grp_spc_.365  0.654        0.618                                
## grp_spn_.365  0.637        0.720        0.622                   
## grp_spct_r.   0.559        0.523        0.539        0.524

## creatinine
model_il1a_value_adjCRE <-  lmer(log10(il1_b_value) ~ log10(creatinine) +
                       group_sep +
                       (1|id), data = model_data, REML = TRUE)

Anova(model_il1a_value_adjCRE, type=2, test.statistic='F')
## Analysis of Deviance Table (Type II Wald F tests with Kenward-Roger df)
## 
## Response: log10(il1_b_value)
##                         F Df Df.res Pr(>F)    
## log10(creatinine)  2.6079  1 446.91  0.107    
## group_sep         60.2097  9 424.02 <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(model_il1a_value_adjCRE)
## Linear mixed model fit by REML ['lmerMod']
## Formula: log10(il1_b_value) ~ log10(creatinine) + group_sep + (1 | id)
##    Data: model_data
## 
## REML criterion at convergence: -506.6
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -6.2651 -0.4723 -0.0876  0.2651  7.0958 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  id       (Intercept) 0.00398  0.06308 
##  Residual             0.01589  0.12605 
## Number of obs: 500, groups:  id, 186
## 
## Fixed effects:
##                                 Estimate Std. Error t value
## (Intercept)                      1.29775    0.08773  14.792
## log10(creatinine)               -0.04885    0.03010  -1.623
## group_sephealthy.000            -0.64254    0.04059 -15.830
## group_sepno_rejection.000        0.04740    0.02675   1.772
## group_sepacute_rejection.007    -0.07077    0.03065  -2.309
## group_sepno_rejection.007       -0.03404    0.02957  -1.151
## group_sepacute_rejection.090    -0.07205    0.03429  -2.101
## group_sepno_rejection.090       -0.10990    0.03794  -2.897
## group_sepacute_rejection.365    -0.09159    0.03576  -2.561
## group_sepno_rejection.365       -0.12697    0.03833  -3.313
## group_sepacute_rejection.biopsy -0.06609    0.03402  -1.943
## 
## Correlation of Fixed Effects:
##              (Intr) lg10() g_.000 g__.000 grp_spc_.007 grp_spn_.007
## lg10(crtnn)  -0.967                                                
## grp_sph.000  -0.785  0.665                                         
## grp_sp_.000  -0.216  0.001  0.465                                  
## grp_spc_.007 -0.549  0.409  0.604  0.504                           
## grp_spn_.007 -0.607  0.427  0.704  0.691   0.630                   
## grp_spc_.090 -0.680  0.561  0.671  0.452   0.623        0.648      
## grp_spn_.090 -0.689  0.557  0.698  0.539   0.583        0.724      
## grp_spc_.365 -0.670  0.556  0.656  0.435   0.605        0.630      
## grp_spn_.365 -0.700  0.569  0.703  0.534   0.584        0.725      
## grp_spct_r.  -0.486  0.360  0.539  0.455   0.542        0.564      
##              grp_spc_.090 grp_spn_.090 grp_spc_.365 grp_spn_.365
## lg10(crtnn)                                                     
## grp_sph.000                                                     
## grp_sp_.000                                                     
## grp_spc_.007                                                    
## grp_spn_.007                                                    
## grp_spc_.090                                                    
## grp_spn_.090  0.631                                             
## grp_spc_.365  0.650        0.616                                
## grp_spn_.365  0.634        0.720        0.620                   
## grp_spct_r.   0.557        0.521        0.537        0.522

5.5.3 IL-1RA

Open code
model_data <- data_long %>% 
  filter(!is.na(il1_ra_value))

## eGFR
model_il1a_value_adjEGFR <-  lmer(log10(il1_ra_value) ~ log10(egfr) +
                       group_sep +
                       (1|id), data = model_data, REML = TRUE)

Anova(model_il1a_value_adjEGFR, type=2, test.statistic='F')
## Analysis of Deviance Table (Type II Wald F tests with Kenward-Roger df)
## 
## Response: log10(il1_ra_value)
##                  F Df Df.res    Pr(>F)    
## log10(egfr) 0.5723  1 471.13    0.4497    
## group_sep   8.2182  9 421.84 2.729e-11 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(model_il1a_value_adjEGFR)
## Linear mixed model fit by REML ['lmerMod']
## Formula: log10(il1_ra_value) ~ log10(egfr) + group_sep + (1 | id)
##    Data: model_data
## 
## REML criterion at convergence: 328.5
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -6.3926 -0.6120 -0.1118  0.4027  3.3995 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  id       (Intercept) 0.02739  0.1655  
##  Residual             0.08421  0.2902  
## Number of obs: 500, groups:  id, 186
## 
## Fixed effects:
##                                 Estimate Std. Error t value
## (Intercept)                      3.13341    0.07761  40.371
## log10(egfr)                     -0.04586    0.06033  -0.760
## group_sephealthy.000            -0.53050    0.09638  -5.504
## group_sepno_rejection.000        0.11660    0.06330   1.842
## group_sepacute_rejection.007    -0.09861    0.07126  -1.384
## group_sepno_rejection.007       -0.04476    0.06999  -0.640
## group_sepacute_rejection.090    -0.07671    0.08023  -0.956
## group_sepno_rejection.090       -0.02831    0.08956  -0.316
## group_sepacute_rejection.365    -0.25189    0.08343  -3.019
## group_sepno_rejection.365       -0.13916    0.09038  -1.540
## group_sepacute_rejection.biopsy -0.14945    0.07896  -1.893
## 
## Correlation of Fixed Effects:
##              (Intr) lg10() g_.000 g__.000 grp_spc_.007 grp_spn_.007
## log10(egfr)   0.729                                                
## grp_sph.000  -0.864 -0.668                                         
## grp_sp_.000  -0.566  0.011  0.455                                  
## grp_spc_.007 -0.708 -0.428  0.605  0.481                           
## grp_spn_.007 -0.830 -0.427  0.703  0.698   0.622                   
## grp_spc_.090 -0.776 -0.579  0.671  0.427   0.631        0.639      
## grp_spn_.090 -0.813 -0.559  0.700  0.543   0.582        0.735      
## grp_spc_.365 -0.757 -0.570  0.655  0.412   0.614        0.621      
## grp_spn_.365 -0.817 -0.570  0.704  0.538   0.584        0.735      
## grp_spct_r.  -0.631 -0.374  0.538  0.435   0.548        0.557      
##              grp_spc_.090 grp_spn_.090 grp_spc_.365 grp_spn_.365
## log10(egfr)                                                     
## grp_sph.000                                                     
## grp_sp_.000                                                     
## grp_spc_.007                                                    
## grp_spn_.007                                                    
## grp_spc_.090                                                    
## grp_spn_.090  0.630                                             
## grp_spc_.365  0.660        0.614                                
## grp_spn_.365  0.633        0.733        0.618                   
## grp_spct_r.   0.563        0.519        0.543        0.520

## creatinine
model_il1a_value_adjCRE <-  lmer(log10(il1_ra_value) ~ log10(creatinine) +
                       group_sep +
                       (1|id), data = model_data, REML = TRUE)

Anova(model_il1a_value_adjCRE, type=2, test.statistic='F')
## Analysis of Deviance Table (Type II Wald F tests with Kenward-Roger df)
## 
## Response: log10(il1_ra_value)
##                        F Df Df.res    Pr(>F)    
## log10(creatinine) 0.0392  1 463.13    0.8432    
## group_sep         8.8310  9 421.85 3.252e-12 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(model_il1a_value_adjCRE)
## Linear mixed model fit by REML ['lmerMod']
## Formula: log10(il1_ra_value) ~ log10(creatinine) + group_sep + (1 | id)
##    Data: model_data
## 
## REML criterion at convergence: 328.7
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -6.3832 -0.5964 -0.1129  0.4054  3.4362 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  id       (Intercept) 0.02787  0.1669  
##  Residual             0.08403  0.2899  
## Number of obs: 500, groups:  id, 186
## 
## Fixed effects:
##                                 Estimate Std. Error t value
## (Intercept)                      3.13644    0.20777  15.096
## log10(creatinine)                0.01417    0.07129   0.199
## group_sephealthy.000            -0.56666    0.09617  -5.892
## group_sepno_rejection.000        0.11720    0.06338   1.849
## group_sepacute_rejection.007    -0.11580    0.07087  -1.634
## group_sepno_rejection.007       -0.06145    0.07006  -0.877
## group_sepacute_rejection.090    -0.10288    0.07967  -1.291
## group_sepno_rejection.090       -0.05644    0.08952  -0.630
## group_sepacute_rejection.365    -0.27863    0.08301  -3.357
## group_sepno_rejection.365       -0.16808    0.09045  -1.858
## group_sepacute_rejection.biopsy -0.16616    0.07875  -2.110
## 
## Correlation of Fixed Effects:
##              (Intr) lg10() g_.000 g__.000 grp_spc_.007 grp_spn_.007
## lg10(crtnn)  -0.967                                                
## grp_sph.000  -0.784  0.665                                         
## grp_sp_.000  -0.215  0.001  0.464                                  
## grp_spc_.007 -0.554  0.419  0.600  0.487                           
## grp_spn_.007 -0.606  0.426  0.703  0.704   0.619                   
## grp_spc_.090 -0.686  0.572  0.667  0.435   0.627        0.637      
## grp_spn_.090 -0.690  0.557  0.699  0.551   0.578        0.735      
## grp_spc_.365 -0.674  0.565  0.652  0.419   0.610        0.620      
## grp_spn_.365 -0.701  0.569  0.704  0.545   0.580        0.736      
## grp_spct_r.  -0.491  0.370  0.535  0.439   0.545        0.555      
##              grp_spc_.090 grp_spn_.090 grp_spc_.365 grp_spn_.365
## lg10(crtnn)                                                     
## grp_sph.000                                                     
## grp_sp_.000                                                     
## grp_spc_.007                                                    
## grp_spn_.007                                                    
## grp_spc_.090                                                    
## grp_spn_.090  0.627                                             
## grp_spc_.365  0.656        0.611                                
## grp_spn_.365  0.630        0.734        0.615                   
## grp_spct_r.   0.561        0.517        0.541        0.518

5.5.4 IL-36b

Open code
model_data <- data_long %>% 
  filter(!is.na(il36_b_value))

## eGFR
model_il1a_value_adjEGFR <-  lmer(log10(il36_b_value) ~ log10(egfr) +
                       group_sep +
                       (1|id), data = model_data, REML = TRUE)

Anova(model_il1a_value_adjEGFR, type=2, test.statistic='F')
## Analysis of Deviance Table (Type II Wald F tests with Kenward-Roger df)
## 
## Response: log10(il36_b_value)
##                  F Df Df.res    Pr(>F)    
## log10(egfr) 1.2709  1 483.53    0.2602    
## group_sep   8.4440  9 419.14 1.263e-11 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(model_il1a_value_adjEGFR)
## Linear mixed model fit by REML ['lmerMod']
## Formula: log10(il36_b_value) ~ log10(egfr) + group_sep + (1 | id)
##    Data: model_data
## 
## REML criterion at convergence: 568.3
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -4.3793 -0.3394  0.0094  0.4113  3.1379 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  id       (Intercept) 0.05718  0.2391  
##  Residual             0.13053  0.3613  
## Number of obs: 500, groups:  id, 186
## 
## Fixed effects:
##                                 Estimate Std. Error t value
## (Intercept)                      0.79149    0.10003   7.913
## log10(egfr)                      0.08778    0.07750   1.133
## group_sephealthy.000            -0.61429    0.12437  -4.939
## group_sepno_rejection.000        0.05272    0.08193   0.643
## group_sepacute_rejection.007    -0.21356    0.08928  -2.392
## group_sepno_rejection.007       -0.09512    0.09046  -1.052
## group_sepacute_rejection.090    -0.43562    0.10109  -4.309
## group_sepno_rejection.090       -0.21029    0.11505  -1.828
## group_sepacute_rejection.365    -0.59875    0.10499  -5.703
## group_sepno_rejection.365       -0.26506    0.11610  -2.283
## group_sepacute_rejection.biopsy -0.55052    0.09905  -5.558
## 
## Correlation of Fixed Effects:
##              (Intr) lg10() g_.000 g__.000 grp_spc_.007 grp_spn_.007
## log10(egfr)   0.727                                                
## grp_sph.000  -0.863 -0.665                                         
## grp_sp_.000  -0.568  0.010  0.456                                  
## grp_spc_.007 -0.700 -0.439  0.598  0.460                           
## grp_spn_.007 -0.829 -0.424  0.701  0.714   0.607                   
## grp_spc_.090 -0.768 -0.591  0.665  0.407   0.637        0.625      
## grp_spn_.090 -0.815 -0.557  0.700  0.559   0.576        0.748      
## grp_spc_.365 -0.749 -0.580  0.649  0.393   0.619        0.608      
## grp_spn_.365 -0.819 -0.568  0.704  0.554   0.577        0.748      
## grp_spct_r.  -0.624 -0.385  0.533  0.416   0.552        0.544      
##              grp_spc_.090 grp_spn_.090 grp_spc_.365 grp_spn_.365
## log10(egfr)                                                     
## grp_sph.000                                                     
## grp_sp_.000                                                     
## grp_spc_.007                                                    
## grp_spn_.007                                                    
## grp_spc_.090                                                    
## grp_spn_.090  0.624                                             
## grp_spc_.365  0.666        0.608                                
## grp_spn_.365  0.627        0.749        0.612                   
## grp_spct_r.   0.569        0.514        0.548        0.515

## creatinine
model_il1a_value_adjCRE <-  lmer(log10(il36_b_value) ~ log10(creatinine) +
                       group_sep +
                       (1|id), data = model_data, REML = TRUE)

Anova(model_il1a_value_adjCRE, type=2, test.statistic='F')
## Analysis of Deviance Table (Type II Wald F tests with Kenward-Roger df)
## 
## Response: log10(il36_b_value)
##                        F Df Df.res    Pr(>F)    
## log10(creatinine) 1.3132  1 477.26    0.2524    
## group_sep         8.5441  9 419.41 8.912e-12 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(model_il1a_value_adjCRE)
## Linear mixed model fit by REML ['lmerMod']
## Formula: log10(il36_b_value) ~ log10(creatinine) + group_sep + (1 | id)
##    Data: model_data
## 
## REML criterion at convergence: 567.9
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -4.3739 -0.3424  0.0122  0.4162  3.1402 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  id       (Intercept) 0.05725  0.2393  
##  Residual             0.13048  0.3612  
## Number of obs: 500, groups:  id, 186
## 
## Fixed effects:
##                                 Estimate Std. Error t value
## (Intercept)                      1.00637    0.26718   3.767
## log10(creatinine)               -0.10552    0.09165  -1.151
## group_sephealthy.000            -0.61524    0.12403  -4.960
## group_sepno_rejection.000        0.05169    0.08192   0.631
## group_sepacute_rejection.007    -0.21315    0.08884  -2.399
## group_sepno_rejection.007       -0.09585    0.09047  -1.059
## group_sepacute_rejection.090    -0.43542    0.10040  -4.337
## group_sepno_rejection.090       -0.21124    0.11493  -1.838
## group_sepacute_rejection.365    -0.59892    0.10450  -5.731
## group_sepno_rejection.365       -0.26631    0.11611  -2.294
## group_sepacute_rejection.biopsy -0.55059    0.09882  -5.572
## 
## Correlation of Fixed Effects:
##              (Intr) lg10() g_.000 g__.000 grp_spc_.007 grp_spn_.007
## lg10(crtnn)  -0.966                                                
## grp_sph.000  -0.783  0.663                                         
## grp_sp_.000  -0.216  0.001  0.464                                  
## grp_spc_.007 -0.559  0.430  0.593  0.467                           
## grp_spn_.007 -0.605  0.424  0.701  0.719   0.605                   
## grp_spc_.090 -0.692  0.584  0.662  0.416   0.633        0.624      
## grp_spn_.090 -0.691  0.556  0.699  0.566   0.572        0.748      
## grp_spc_.365 -0.679  0.575  0.646  0.401   0.615        0.607      
## grp_spn_.365 -0.701  0.568  0.704  0.560   0.574        0.748      
## grp_spct_r.  -0.497  0.380  0.530  0.421   0.549        0.543      
##              grp_spc_.090 grp_spn_.090 grp_spc_.365 grp_spn_.365
## lg10(crtnn)                                                     
## grp_sph.000                                                     
## grp_sp_.000                                                     
## grp_spc_.007                                                    
## grp_spn_.007                                                    
## grp_spc_.090                                                    
## grp_spn_.090  0.621                                             
## grp_spc_.365  0.663        0.606                                
## grp_spn_.365  0.625        0.749        0.610                   
## grp_spct_r.   0.566        0.512        0.545        0.513

6 IL18 forms plot

At first, we need to transform IL-18 levels to molar concentration (pM/L)

Open code
data_long <- data_long %>% 
  mutate( il18bp_pM = (((il18_bp_value/1e12)*1000) / 19000)*1e12,
         il18tot_pM = (((il18_value/1e12)*1000) / 17200)*1e12,
        il18free_pM = (((il18_free/1e12)*1000) / 17200) *1e12)

Now, we can create plots to demonstrate the relationship between IL-18BP levels and IL-18 levels (both free and total). We will concentrate on healthy individuals and the initial measurement from the group without rejection, noted for its significant variability in IL-18BP and IL-18 levels. The plots will display examples showcasing both minimal and very high IL-18 binding.

6.1 Individual plots per selected groups

Open code
## prepare data
il18d <- data_long %>% 
  filter(!is.na(il18_value),
         !is.na(il18_bp_value),
         !is.na(il18_free)) %>% 
  mutate(group = factor(group, levels = 
                          c("no_rejection", 
                            "acute_rejection",
                            "healthy")),
         time_point = factor(time_point)) %>% 
  mutate(time_point = if_else(group == 'healthy', 'healthy', time_point)) %>% 
  mutate(group_sep = interaction(group, time_point))

## Plot for healthy
p18_healthy <- il18d %>% 
  filter(group_sep == 'healthy.healthy') %>% 
  ggplot(aes(x = il18bp_pM)) +
  geom_point(aes(y = il18free_pM, color = "IL-18 Free")) +  
  geom_point(aes(y = il18tot_pM, color = "IL-18 Total"), pch=1) +  
  geom_line(data = . %>% 
              select(il18bp_pM, il18free_pM,  il18tot_pM) %>% 
              pivot_longer(cols = -il18bp_pM, 
                           names_to = "variable", values_to = "value"),
            aes(x = il18bp_pM, y = value, group = il18bp_pM), col = 'grey20') +
  scale_color_manual(values = c("IL-18 Free" = "blue", "IL-18 Total" = "red")) +
  labs(x = "IL-18BP (pM)", y = "IL-18 (pM)", color = "") +
  coord_cartesian(ylim = c(0, NA)) +
  ggtitle("Samples from healthy donors")
p18_healthy

Open code


## plot for D0, group without rejection
p18_no_reject_0 <- il18d %>% 
  filter(group_sep == 'no_rejection.000') %>% 
  ggplot(aes(x = il18bp_pM)) +
  geom_point(aes(y = il18free_pM, color = "IL-18 Free")) +  
  geom_point(aes(y = il18tot_pM, color = "IL-18 Total"), pch=1) +  
  geom_line(data = . %>% 
              select(il18bp_pM, il18free_pM,  il18tot_pM) %>% 
              pivot_longer(cols = -il18bp_pM, 
                           names_to = "variable", values_to = "value"),
            aes(x = il18bp_pM, y = value, group = il18bp_pM), col = 'grey20') +
  scale_color_manual(values = c("IL-18 Free" = "blue", "IL-18 Total" = "red")) +
  labs(x = "IL-18BP (pM)", y = "IL-18 (pM)", color = "") +
  coord_cartesian(ylim = c(0, NA)) +
  ggtitle("No rejection group, the 1st measurement")
p18_no_reject_0

Open code

## plot for D0, group with rejection
p18_acute_reject_0 <- il18d %>% 
  filter(group_sep == 'acute_rejection.000') %>% 
  ggplot(aes(x = il18bp_pM)) +
  geom_point(aes(y = il18free_pM, color = "IL-18 Free")) +  
  geom_point(aes(y = il18tot_pM, color = "IL-18 Total"), pch=1) +  
  geom_line(data = . %>% 
              select(il18bp_pM, il18free_pM,  il18tot_pM) %>% 
              pivot_longer(cols = -il18bp_pM, 
                           names_to = "variable", values_to = "value"),
            aes(x = il18bp_pM, y = value, group = il18bp_pM), col = 'grey20') +
  scale_color_manual(values = c("IL-18 Free" = "blue", "IL-18 Total" = "red")) +
  labs(x = "IL-18BP (pM)", y = "IL-18 (pM)", color = "") +
  coord_cartesian(ylim = c(0, NA)) +
  ggtitle("Acute rejection group, the 1st measurement")



## plot for D90, group without rejection
p18_no_reject_90 <- il18d %>% 
  filter(group_sep == 'no_rejection.090') %>% 
  ggplot(aes(x = il18bp_pM)) +
  geom_point(aes(y = il18free_pM, color = "IL-18 Free")) +  
  geom_point(aes(y = il18tot_pM, color = "IL-18 Total"), pch=1) +  
  geom_line(data = . %>% 
              select(il18bp_pM, il18free_pM,  il18tot_pM) %>% 
              pivot_longer(cols = -il18bp_pM, 
                           names_to = "variable", values_to = "value"),
            aes(x = il18bp_pM, y = value, group = il18bp_pM), col = 'grey20') +
  scale_color_manual(values = c("IL-18 Free" = "blue", "IL-18 Total" = "red")) +
  labs(x = "IL-18BP (pM)", y = "IL-18 (pM)", color = "") +
  coord_cartesian(ylim = c(0, NA)) +
  ggtitle("No rejection group, day 90")

## plot for biopsy measurement, rejection group
p18_acute_reject_biopsy <- il18d %>% 
  filter(group_sep == 'acute_rejection.biopsy') %>% 
  ggplot(aes(x = il18bp_pM)) +
  geom_point(aes(y = il18free_pM, color = "IL-18 Free")) +  
  geom_point(aes(y = il18tot_pM, color = "IL-18 Total"), pch=1) +  
  geom_line(data = . %>% 
              select(il18bp_pM, il18free_pM,  il18tot_pM) %>% 
              pivot_longer(cols = -il18bp_pM, 
                           names_to = "variable", values_to = "value"),
            aes(x = il18bp_pM, y = value, group = il18bp_pM), col = 'grey20') +
  scale_color_manual(values = c("IL-18 Free" = "blue", "IL-18 Total" = "red")) +
  labs(x = "IL-18BP (pM)", y = "IL-18 (pM)", color = "") +
  coord_cartesian(ylim = c(0, NA)) +
  ggtitle("Rejection group, day of biopsy")

p18_acute_reject_biopsy

6.2 acute/no rejection difference

Open code
il18d <- il18d %>% 
  mutate(free_ratio = il18free_pM/il18tot_pM)


ymax = 580
xmax = 500
xmin = 0


p1 <- il18d %>% 
  filter(group_sep == 'no_rejection.090') %>% 
  ggplot(aes(x = il18bp_pM)) +
  geom_point(aes(y = il18free_pM, color = "IL-18 Free")) +  
  geom_point(aes(y = il18tot_pM, color = "IL-18 Total"), pch=1) +  
  geom_line(data = . %>% 
              select(il18bp_pM, il18free_pM,  il18tot_pM) %>% 
              pivot_longer(cols = -il18bp_pM, 
                           names_to = "variable", values_to = "value"),
            aes(x = il18bp_pM, y = value, group = il18bp_pM), col = 'grey20') +
  scale_color_manual(values = c("IL-18 Free" = "blue", "IL-18 Total" = "red")) +
  labs(x = "IL-18BP (pM)", y = "IL-18 (pM)", color = "") +
  coord_cartesian(xlim = c(xmin, xmax), ylim = c(0, ymax)) +
  ggtitle("No rejection, day 90") + 
  theme(legend.position = 'none')

p2 <- il18d %>% 
  filter(group_sep == 'acute_rejection.biopsy') %>% 
  ggplot(aes(x = il18bp_pM)) +
  geom_point(aes(y = il18free_pM, color = "IL-18 Free")) +  
  geom_point(aes(y = il18tot_pM, color = "IL-18 Total"), pch=1) +  
  geom_line(data = . %>% 
              select(il18bp_pM, il18free_pM,  il18tot_pM) %>% 
              pivot_longer(cols = -il18bp_pM, 
                           names_to = "variable", values_to = "value"),
            aes(x = il18bp_pM, y = value, group = il18bp_pM), col = 'grey20') +
  scale_color_manual(values = c("IL-18 Free" = "blue", "IL-18 Total" = "red")) +
  labs(x = "IL-18BP (pM)", y = "IL-18 (pM)", color = "") +
  coord_cartesian(xlim = c(xmin, xmax), ylim = c(0, ymax)) +
  ggtitle("Rejection, day of biopsy")+
  theme(legend.position = c(0.85, 0.9))
## Warning: A numeric `legend.position` argument in `theme()` was deprecated in ggplot2
## 3.5.0.
## ℹ Please use the `legend.position.inside` argument of `theme()` instead.



p3 <- il18d %>% 
  filter(group_sep == 'no_rejection.000') %>% 
  ggplot(aes(x = il18bp_pM)) +
  geom_point(aes(y = il18free_pM, color = "IL-18 Free")) +  
  geom_point(aes(y = il18tot_pM, color = "IL-18 Total"), pch=1) +  
  geom_line(data = . %>% 
              select(il18bp_pM, il18free_pM,  il18tot_pM) %>% 
              pivot_longer(cols = -il18bp_pM, 
                           names_to = "variable", values_to = "value"),
            aes(x = il18bp_pM, y = value, group = il18bp_pM), col = 'grey20') +
  scale_color_manual(values = c("IL-18 Free" = "blue", "IL-18 Total" = "red")) +
  labs(x = "IL-18BP (pM)", y = "IL-18 (pM)", color = "") +
  coord_cartesian(xlim = c(xmin, xmax), ylim = c(0, ymax)) +
  ggtitle("No rejection, before TX") + 
  theme(legend.position = 'none')

p4 <- il18d %>% 
  filter(group_sep == 'acute_rejection.000') %>% 
  ggplot(aes(x = il18bp_pM)) +
  geom_point(aes(y = il18free_pM, color = "IL-18 Free")) +  
  geom_point(aes(y = il18tot_pM, color = "IL-18 Total"), pch=1) +  
  geom_line(data = . %>% 
              select(il18bp_pM, il18free_pM,  il18tot_pM) %>% 
              pivot_longer(cols = -il18bp_pM, 
                           names_to = "variable", values_to = "value"),
            aes(x = il18bp_pM, y = value, group = il18bp_pM), col = 'grey20') +
  scale_color_manual(values = c("IL-18 Free" = "blue", "IL-18 Total" = "red")) +
  labs(x = "IL-18BP (pM)", y = "IL-18 (pM)", color = "") +
  coord_cartesian(xlim = c(xmin, xmax), ylim = c(0, ymax)) +
  ggtitle("Rejection, before TX")+
  theme(legend.position = 'none')


fig12 <- plot_grid(p3, p4, p1, p2)
if(file.exists('gitignore/figures/fig12.pdf') == FALSE){
  ggsave("gitignore/figures/fig12.pdf", 
         plot = fig12, width = 8, height = 8, units = "in")
}

plotac <- 'fig12'

path = paste0('gitignore/figures/',plotac, '.eps')
if(file.exists(path) == FALSE){
  ggsave(path, 
         plot = get(plotac), width = 8, height = 8, units = "in")
}

fig12

7 Prediction of rejection with D90 data

7.1 Data preparation

Open code
wdat <- data_long %>% 
  filter(group_sep == 'no_rejection.090' |
           group_sep == 'acute_rejection.biopsy') %>% 
  mutate(group = factor(group)) %>% 
  select(-group)

wpdat <- patient_table %>% 
  select(id, donor_age, dsa, anti_hla, TX_order, group, MT_minutes, induction_therapy) %>% 
  mutate(anti_hla = if_else(is.na(anti_hla), '0', anti_hla)) %>% 
  mutate(anti_hla = if_else(anti_hla == 'pos', 1, 0),
         TX_order = factor(if_else(TX_order == 1, '1', '2+')),
         rejection = if_else(group == 'no_rejection', 0, 1))

wdat <- wdat %>%
  left_join(wpdat, by = 'id')

summary(wdat)
##       id             time_point    id_obs           il1_a_value     
##  Length:115         000   : 0   Length:115         Min.   : 0.1751  
##  Class :character   007   : 0   Class :character   1st Qu.: 3.2823  
##  Mode  :character   090   :87   Mode  :character   Median : 4.7830  
##                     365   : 0                      Mean   : 5.1383  
##                     biopsy:28                      3rd Qu.: 6.3253  
##                                                    Max.   :14.5740  
##                                                    NA's   :48       
##   il1_b_value      il1_ra_value       il18_value     il18_bp_value 
##  Min.   : 8.505   Min.   :  390.9   Min.   : 204.2   Min.   :1638  
##  1st Qu.:11.397   1st Qu.:  735.0   1st Qu.: 447.3   1st Qu.:2858  
##  Median :12.358   Median : 1008.2   Median : 629.8   Median :3353  
##  Mean   :12.693   Mean   : 1648.9   Mean   : 827.8   Mean   :3387  
##  3rd Qu.:13.584   3rd Qu.: 1616.0   3rd Qu.: 939.4   3rd Qu.:3761  
##  Max.   :24.261   Max.   :10180.2   Max.   :7455.6   Max.   :6011  
##  NA's   :48       NA's   :48        NA's   :48                     
##  il18_bp_ratio       il18_free       il36_b_value       creatinine   
##  Min.   :  22.04   Min.   : 137.3   Min.   : 0.0258   Min.   : 60.6  
##  1st Qu.:  52.01   1st Qu.: 316.2   1st Qu.: 2.2833   1st Qu.:112.5  
##  Median :  69.29   Median : 434.1   Median : 3.2191   Median :142.0  
##  Mean   :  99.87   Mean   : 571.5   Mean   : 4.3440   Mean   :177.1  
##  3rd Qu.: 112.00   3rd Qu.: 655.0   3rd Qu.: 4.4641   3rd Qu.:203.2  
##  Max.   :1067.76   Max.   :5452.0   Max.   :37.1179   Max.   :804.6  
##  NA's   :48        NA's   :48       NA's   :48                       
##       egfr                         group_sep    il18bp_pM        il18tot_pM    
##  Min.   :0.0900   no_rejection.090      :87   Min.   : 86.21   Min.   : 11.87  
##  1st Qu.:0.5000   acute_rejection.biopsy:28   1st Qu.:150.39   1st Qu.: 26.01  
##  Median :0.7500   acute_rejection.000   : 0   Median :176.47   Median : 36.62  
##  Mean   :0.7367   healthy.000           : 0   Mean   :178.28   Mean   : 48.13  
##  3rd Qu.:0.9350   no_rejection.000      : 0   3rd Qu.:197.95   3rd Qu.: 54.62  
##  Max.   :1.5200   acute_rejection.007   : 0   Max.   :316.36   Max.   :433.47  
##                   (Other)               : 0                    NA's   :48      
##   il18free_pM       donor_age         dsa               anti_hla      TX_order
##  Min.   :  7.98   Min.   : 1.00   Length:115         Min.   :0.0000   1 :107  
##  1st Qu.: 18.39   1st Qu.:46.00   Class :character   1st Qu.:0.0000   2+:  8  
##  Median : 25.24   Median :56.00   Mode  :character   Median :0.0000           
##  Mean   : 33.23   Mean   :53.76                      Mean   :0.2435           
##  3rd Qu.: 38.08   3rd Qu.:65.00                      3rd Qu.:0.0000           
##  Max.   :316.98   Max.   :81.00                      Max.   :1.0000           
##  NA's   :48                                                                   
##     group             MT_minutes      induction_therapy   rejection     
##  Length:115         Min.   : 7.00   ATG        :69      Min.   :0.0000  
##  Class :character   1st Qu.:19.00   ATG,PE,IVIG:13      1st Qu.:0.0000  
##  Mode  :character   Median :24.00   basiliximab:33      Median :0.0000  
##                     Mean   :25.63                       Mean   :0.2435  
##                     3rd Qu.:31.50                       3rd Qu.:0.0000  
##                     Max.   :57.00                       Max.   :1.0000  
## 

7.2 Il18bp model

Open code

wdat_sbs <- wdat %>% filter(!is.na(il18_bp_value))

model <- glm(rejection ~ 
               dsa +
               TX_order + 
               log2(il18_bp_value), 
             data = wdat_sbs,
             family = binomial(link = 'logit'))

basemod <- update(model, ~ . -log2(il18_bp_value))
AIC(model) - AIC(basemod)
## [1] -6.095499
tr <- data.frame(pred_b = as.numeric(predict(basemod)),
                 pred = as.numeric(predict(model)),
                 reject = model$model$rejection)
auc1 <- roc(response = tr$reject, predictor = tr$pred_b)
## Setting levels: control = 0, case = 1
## Setting direction: controls < cases
auc1
## 
## Call:
## roc.default(response = tr$reject, predictor = tr$pred_b)
## 
## Data: tr$pred_b in 87 controls (tr$reject 0) < 28 cases (tr$reject 1).
## Area under the curve: 0.6396

auc2 <- roc(response = tr$reject, predictor = tr$pred)
## Setting levels: control = 0, case = 1
## Setting direction: controls < cases
auc2
## 
## Call:
## roc.default(response = tr$reject, predictor = tr$pred)
## 
## Data: tr$pred in 87 controls (tr$reject 0) < 28 cases (tr$reject 1).
## Area under the curve: 0.7529

roc.test(auc1, auc2)
## 
##  DeLong's test for two correlated ROC curves
## 
## data:  auc1 and auc2
## Z = -2.43, p-value = 0.0151
## alternative hypothesis: true difference in AUC is not equal to 0
## 95 percent confidence interval:
##  -0.20468627 -0.02191472
## sample estimates:
## AUC of roc1 AUC of roc2 
##   0.6395731   0.7528736
  
tr <- summary(model)$coefficients[-1, c(1,4)]
colnames(tr)[1] <- 'Odds ratio'
tr[,1] <- round(exp(tr[,1]),2)
tr[,2] <- round(tr[,2], 4)
kableExtra::kable(tr)
Odds ratio Pr(>|z|)
dsapos 1.89 0.3009
TX_order2+ 18.35 0.0134
log2(il18_bp_value) 10.95 0.0074
Open code



model_egfr <- glm(rejection ~ 
               egfr + 
               dsa + 
               #anti_hla +
               TX_order + 
               #induction_therapy +
               log2(il18_bp_value), 
             data = wdat_sbs,
             family = binomial(link = 'logit'))

basemod <- update(model_egfr, ~ . -log2(il18_bp_value))
AIC(model_egfr) - AIC(basemod)  
## [1] -2.593178
tr <- data.frame(pred_b = as.numeric(predict(basemod)),
                 pred = as.numeric(predict(model_egfr)),
                 reject = model_egfr$model$rejection)
auc1 <- roc(response = tr$reject, predictor = tr$pred_b)
## Setting levels: control = 0, case = 1
## Setting direction: controls < cases
auc1
## 
## Call:
## roc.default(response = tr$reject, predictor = tr$pred_b)
## 
## Data: tr$pred_b in 87 controls (tr$reject 0) < 28 cases (tr$reject 1).
## Area under the curve: 0.9009

auc2 <- roc(response = tr$reject, predictor = tr$pred)
## Setting levels: control = 0, case = 1
## Setting direction: controls < cases
auc2
## 
## Call:
## roc.default(response = tr$reject, predictor = tr$pred)
## 
## Data: tr$pred in 87 controls (tr$reject 0) < 28 cases (tr$reject 1).
## Area under the curve: 0.9072

roc.test(auc1, auc2)
## 
##  DeLong's test for two correlated ROC curves
## 
## data:  auc1 and auc2
## Z = -0.53456, p-value = 0.593
## alternative hypothesis: true difference in AUC is not equal to 0
## 95 percent confidence interval:
##  -0.02969228  0.01696650
## sample estimates:
## AUC of roc1 AUC of roc2 
##   0.9008621   0.9072250


tr <- summary(model_egfr)$coefficients[-1, c(1,4)]
colnames(tr)[1] <- 'Odds ratio'
tr[,1] <- round(exp(tr[,1]), 3)
tr[,2] <- round(tr[,2], 4)
kableExtra::kable(tr)
Odds ratio Pr(>|z|)
egfr 0.002 0.0000
dsapos 0.698 0.6400
TX_order2+ 24.074 0.0131
log2(il18_bp_value) 13.119 0.0456

7.3 Il-1a model

Open code

wdat_sbs <- wdat %>% filter(!is.na(il1_a_value))

model <- glm(rejection ~ 
               dsa +
               TX_order + 
               log2(il1_a_value), 
             data = wdat_sbs,
             family = binomial(link = 'logit'))

basemod <- update(model, ~ . -log2(il1_a_value))
AIC(model) - AIC(basemod)
## [1] -13.18607
tr <- data.frame(pred_b = as.numeric(predict(basemod)),
                 pred = as.numeric(predict(model)),
                 reject = model$model$rejection)
auc1 <- roc(response = tr$reject, predictor = tr$pred_b)
## Setting levels: control = 0, case = 1
## Setting direction: controls < cases
auc1
## 
## Call:
## roc.default(response = tr$reject, predictor = tr$pred_b)
## 
## Data: tr$pred_b in 39 controls (tr$reject 0) < 28 cases (tr$reject 1).
## Area under the curve: 0.6273

auc2 <- roc(response = tr$reject, predictor = tr$pred)
## Setting levels: control = 0, case = 1
## Setting direction: controls < cases
auc2
## 
## Call:
## roc.default(response = tr$reject, predictor = tr$pred)
## 
## Data: tr$pred in 39 controls (tr$reject 0) < 28 cases (tr$reject 1).
## Area under the curve: 0.8187

roc.test(auc1, auc2)
## 
##  DeLong's test for two correlated ROC curves
## 
## data:  auc1 and auc2
## Z = -3.4108, p-value = 0.0006477
## alternative hypothesis: true difference in AUC is not equal to 0
## 95 percent confidence interval:
##  -0.30137233 -0.08141155
## sample estimates:
## AUC of roc1 AUC of roc2 
##   0.6272894   0.8186813
  
tr <- summary(model)$coefficients[-1, c(1,4)]
colnames(tr)[1] <- 'Odds ratio'
tr[,1] <- round(exp(tr[,1]),2)
tr[,2] <- round(tr[,2], 4)
kableExtra::kable(tr)
Odds ratio Pr(>|z|)
dsapos 0.93 0.9305
TX_order2+ 10.07 0.0649
log2(il1_a_value) 0.16 0.0016
Open code


model_egfr <- glm(rejection ~ 
               egfr + 
               dsa + 
               #anti_hla +
               TX_order + 
               #induction_therapy +
               log2(il1_a_value), 
             data = wdat_sbs,
             family = binomial(link = 'logit'))

basemod <- update(model_egfr, ~ . -log2(il1_a_value))
AIC(model_egfr) - AIC(basemod)  
## [1] -7.753888
tr <- data.frame(pred_b = as.numeric(predict(basemod)),
                 pred = as.numeric(predict(model_egfr)),
                 reject = model_egfr$model$rejection)
auc1 <- roc(response = tr$reject, predictor = tr$pred_b)
## Setting levels: control = 0, case = 1
## Setting direction: controls < cases
auc1
## 
## Call:
## roc.default(response = tr$reject, predictor = tr$pred_b)
## 
## Data: tr$pred_b in 39 controls (tr$reject 0) < 28 cases (tr$reject 1).
## Area under the curve: 0.8929

auc2 <- roc(response = tr$reject, predictor = tr$pred)
## Setting levels: control = 0, case = 1
## Setting direction: controls < cases
auc2
## 
## Call:
## roc.default(response = tr$reject, predictor = tr$pred)
## 
## Data: tr$pred in 39 controls (tr$reject 0) < 28 cases (tr$reject 1).
## Area under the curve: 0.9212

roc.test(auc1, auc2)
## 
##  DeLong's test for two correlated ROC curves
## 
## data:  auc1 and auc2
## Z = -1.425, p-value = 0.1542
## alternative hypothesis: true difference in AUC is not equal to 0
## 95 percent confidence interval:
##  -0.06743334  0.01065678
## sample estimates:
## AUC of roc1 AUC of roc2 
##   0.8928571   0.9212454


tr <- summary(model_egfr)$coefficients[-1, c(1,4)]
colnames(tr)[1] <- 'Odds ratio'
tr[,1] <- round(exp(tr[,1]), 3)
tr[,2] <- round(tr[,2], 4)
kableExtra::kable(tr)
Odds ratio Pr(>|z|)
egfr 0.006 0.0006
dsapos 0.318 0.2823
TX_order2+ 16.753 0.0512
log2(il1_a_value) 0.152 0.0156

7.4 Il-1b model

Open code

wdat_sbs <- wdat %>% filter(!is.na(il1_b_value))

model <- glm(rejection ~ 
               dsa +
               TX_order + 
               log2(il1_b_value), 
             data = wdat_sbs,
             family = binomial(link = 'logit'))

basemod <- update(model, ~ . -log2(il1_b_value))
AIC(model) - AIC(basemod)
## [1] 1.018489
tr <- data.frame(pred_b = as.numeric(predict(basemod)),
                 pred = as.numeric(predict(model)),
                 reject = model$model$rejection)
auc1 <- roc(response = tr$reject, predictor = tr$pred_b)
## Setting levels: control = 0, case = 1
## Setting direction: controls < cases
auc1
## 
## Call:
## roc.default(response = tr$reject, predictor = tr$pred_b)
## 
## Data: tr$pred_b in 39 controls (tr$reject 0) < 28 cases (tr$reject 1).
## Area under the curve: 0.6273

auc2 <- roc(response = tr$reject, predictor = tr$pred)
## Setting levels: control = 0, case = 1
## Setting direction: controls < cases
auc2
## 
## Call:
## roc.default(response = tr$reject, predictor = tr$pred)
## 
## Data: tr$pred in 39 controls (tr$reject 0) < 28 cases (tr$reject 1).
## Area under the curve: 0.6571

roc.test(auc1, auc2)
## 
##  DeLong's test for two correlated ROC curves
## 
## data:  auc1 and auc2
## Z = -0.67843, p-value = 0.4975
## alternative hypothesis: true difference in AUC is not equal to 0
## 95 percent confidence interval:
##  -0.11574368  0.05621987
## sample estimates:
## AUC of roc1 AUC of roc2 
##   0.6272894   0.6570513
  
tr <- summary(model)$coefficients[-1, c(1,4)]
colnames(tr)[1] <- 'Odds ratio'
tr[,1] <- round(exp(tr[,1]),2)
tr[,2] <- round(tr[,2], 4)
kableExtra::kable(tr)
Odds ratio Pr(>|z|)
dsapos 1.97 0.3237
TX_order2+ 7.45 0.0920
log2(il1_b_value) 2.84 0.3261
Open code



model_egfr <- glm(rejection ~ 
               egfr + 
               dsa + 
               #anti_hla +
               TX_order + 
               #induction_therapy +
               log2(il1_b_value), 
             data = wdat_sbs,
             family = binomial(link = 'logit'))

basemod <- update(model_egfr, ~ . -log2(il1_b_value))
AIC(model_egfr) - AIC(basemod)  
## [1] 1.488668
tr <- data.frame(pred_b = as.numeric(predict(basemod)),
                 pred = as.numeric(predict(model_egfr)),
                 reject = model_egfr$model$rejection)
auc1 <- roc(response = tr$reject, predictor = tr$pred_b)
## Setting levels: control = 0, case = 1
## Setting direction: controls < cases
auc1
## 
## Call:
## roc.default(response = tr$reject, predictor = tr$pred_b)
## 
## Data: tr$pred_b in 39 controls (tr$reject 0) < 28 cases (tr$reject 1).
## Area under the curve: 0.8929

auc2 <- roc(response = tr$reject, predictor = tr$pred)
## Setting levels: control = 0, case = 1
## Setting direction: controls < cases
auc2
## 
## Call:
## roc.default(response = tr$reject, predictor = tr$pred)
## 
## Data: tr$pred in 39 controls (tr$reject 0) < 28 cases (tr$reject 1).
## Area under the curve: 0.8993

roc.test(auc1, auc2)
## 
##  DeLong's test for two correlated ROC curves
## 
## data:  auc1 and auc2
## Z = -0.98472, p-value = 0.3248
## alternative hypothesis: true difference in AUC is not equal to 0
## 95 percent confidence interval:
##  -0.019169044  0.006348531
## sample estimates:
## AUC of roc1 AUC of roc2 
##   0.8928571   0.8992674


tr <- summary(model_egfr)$coefficients[-1, c(1,4)]
colnames(tr)[1] <- 'Odds ratio'
tr[,1] <- round(exp(tr[,1]), 3)
tr[,2] <- round(tr[,2], 4)
kableExtra::kable(tr)
Odds ratio Pr(>|z|)
egfr 0.004 0.0002
dsapos 0.672 0.6297
TX_order2+ 10.243 0.0686
log2(il1_b_value) 2.824 0.4778

7.5 Il-18 total model

Open code

wdat_sbs <- wdat %>% filter(!is.na(il18_value))

model <- glm(rejection ~ 
               dsa +
               TX_order + 
               log2(il18_value), 
             data = wdat_sbs,
             family = binomial(link = 'logit'))

basemod <- update(model, ~ . -log2(il18_value))
AIC(model) - AIC(basemod)
## [1] 1.926523
tr <- data.frame(pred_b = as.numeric(predict(basemod)),
                 pred = as.numeric(predict(model)),
                 reject = model$model$rejection)
auc1 <- roc(response = tr$reject, predictor = tr$pred_b)
## Setting levels: control = 0, case = 1
## Setting direction: controls < cases
auc1
## 
## Call:
## roc.default(response = tr$reject, predictor = tr$pred_b)
## 
## Data: tr$pred_b in 39 controls (tr$reject 0) < 28 cases (tr$reject 1).
## Area under the curve: 0.6273

auc2 <- roc(response = tr$reject, predictor = tr$pred)
## Setting levels: control = 0, case = 1
## Setting direction: controls < cases
auc2
## 
## Call:
## roc.default(response = tr$reject, predictor = tr$pred)
## 
## Data: tr$pred in 39 controls (tr$reject 0) < 28 cases (tr$reject 1).
## Area under the curve: 0.6273

roc.test(auc1, auc2)
## 
##  DeLong's test for two correlated ROC curves
## 
## data:  auc1 and auc2
## Z = 0, p-value = 1
## alternative hypothesis: true difference in AUC is not equal to 0
## 95 percent confidence interval:
##  -0.08946882  0.08946882
## sample estimates:
## AUC of roc1 AUC of roc2 
##   0.6272894   0.6272894
  
tr <- summary(model)$coefficients[-1, c(1,4)]
colnames(tr)[1] <- 'Odds ratio'
tr[,1] <- round(exp(tr[,1]),2)
tr[,2] <- round(tr[,2], 4)
kableExtra::kable(tr)
Odds ratio Pr(>|z|)
dsapos 1.91 0.3451
TX_order2+ 7.95 0.0835
log2(il18_value) 1.09 0.7858
Open code



model_egfr <- glm(rejection ~ 
               egfr + 
               dsa + 
               #anti_hla +
               TX_order + 
               #induction_therapy +
               log2(il18_value), 
             data = wdat_sbs,
             family = binomial(link = 'logit'))

basemod <- update(model_egfr, ~ . -log2(il18_value))
AIC(model_egfr) - AIC(basemod)  
## [1] 1.858742
tr <- data.frame(pred_b = as.numeric(predict(basemod)),
                 pred = as.numeric(predict(model_egfr)),
                 reject = model_egfr$model$rejection)
auc1 <- roc(response = tr$reject, predictor = tr$pred_b)
## Setting levels: control = 0, case = 1
## Setting direction: controls < cases
auc1
## 
## Call:
## roc.default(response = tr$reject, predictor = tr$pred_b)
## 
## Data: tr$pred_b in 39 controls (tr$reject 0) < 28 cases (tr$reject 1).
## Area under the curve: 0.8929

auc2 <- roc(response = tr$reject, predictor = tr$pred)
## Setting levels: control = 0, case = 1
## Setting direction: controls < cases
auc2
## 
## Call:
## roc.default(response = tr$reject, predictor = tr$pred)
## 
## Data: tr$pred in 39 controls (tr$reject 0) < 28 cases (tr$reject 1).
## Area under the curve: 0.8901

roc.test(auc1, auc2)
## 
##  DeLong's test for two correlated ROC curves
## 
## data:  auc1 and auc2
## Z = 0.58574, p-value = 0.558
## alternative hypothesis: true difference in AUC is not equal to 0
## 95 percent confidence interval:
##  -0.006445401  0.011939906
## sample estimates:
## AUC of roc1 AUC of roc2 
##   0.8928571   0.8901099


tr <- summary(model_egfr)$coefficients[-1, c(1,4)]
colnames(tr)[1] <- 'Odds ratio'
tr[,1] <- round(exp(tr[,1]), 3)
tr[,2] <- round(tr[,2], 4)
kableExtra::kable(tr)
Odds ratio Pr(>|z|)
egfr 0.004 0.0001
dsapos 0.649 0.6031
TX_order2+ 10.412 0.0681
log2(il18_value) 1.182 0.7052

7.6 Il-18free model

Open code

wdat_sbs <- wdat %>% filter(!is.na(il18_free))

model <- glm(rejection ~ 
               dsa +
               TX_order + 
               log2(il18_free), 
             data = wdat_sbs,
             family = binomial(link = 'logit'))

basemod <- update(model, ~ . -log2(il18_free))
AIC(model) - AIC(basemod)
## [1] 1.999061
tr <- data.frame(pred_b = as.numeric(predict(basemod)),
                 pred = as.numeric(predict(model)),
                 reject = model$model$rejection)
auc1 <- roc(response = tr$reject, predictor = tr$pred_b)
## Setting levels: control = 0, case = 1
## Setting direction: controls < cases
auc1
## 
## Call:
## roc.default(response = tr$reject, predictor = tr$pred_b)
## 
## Data: tr$pred_b in 39 controls (tr$reject 0) < 28 cases (tr$reject 1).
## Area under the curve: 0.6273

auc2 <- roc(response = tr$reject, predictor = tr$pred)
## Setting levels: control = 0, case = 1
## Setting direction: controls < cases
auc2
## 
## Call:
## roc.default(response = tr$reject, predictor = tr$pred)
## 
## Data: tr$pred in 39 controls (tr$reject 0) < 28 cases (tr$reject 1).
## Area under the curve: 0.6236

roc.test(auc1, auc2)
## 
##  DeLong's test for two correlated ROC curves
## 
## data:  auc1 and auc2
## Z = 0.080581, p-value = 0.9358
## alternative hypothesis: true difference in AUC is not equal to 0
## 95 percent confidence interval:
##  -0.08543186  0.09275787
## sample estimates:
## AUC of roc1 AUC of roc2 
##   0.6272894   0.6236264
  
tr <- summary(model)$coefficients[-1, c(1,4)]
colnames(tr)[1] <- 'Odds ratio'
tr[,1] <- round(exp(tr[,1]),2)
tr[,2] <- round(tr[,2], 4)
kableExtra::kable(tr)
Odds ratio Pr(>|z|)
dsapos 1.88 0.3573
TX_order2+ 8.28 0.0782
log2(il18_free) 1.01 0.9755
Open code



model_egfr <- glm(rejection ~ 
               egfr + 
               dsa + 
               #anti_hla +
               TX_order + 
               #induction_therapy +
               log2(il18_free), 
             data = wdat_sbs,
             family = binomial(link = 'logit'))

basemod <- update(model_egfr, ~ . -log2(il18_free))
AIC(model_egfr) - AIC(basemod)  
## [1] 1.961429
tr <- data.frame(pred_b = as.numeric(predict(basemod)),
                 pred = as.numeric(predict(model_egfr)),
                 reject = model_egfr$model$rejection)
auc1 <- roc(response = tr$reject, predictor = tr$pred_b)
## Setting levels: control = 0, case = 1
## Setting direction: controls < cases
auc1
## 
## Call:
## roc.default(response = tr$reject, predictor = tr$pred_b)
## 
## Data: tr$pred_b in 39 controls (tr$reject 0) < 28 cases (tr$reject 1).
## Area under the curve: 0.8929

auc2 <- roc(response = tr$reject, predictor = tr$pred)
## Setting levels: control = 0, case = 1
## Setting direction: controls < cases
auc2
## 
## Call:
## roc.default(response = tr$reject, predictor = tr$pred)
## 
## Data: tr$pred in 39 controls (tr$reject 0) < 28 cases (tr$reject 1).
## Area under the curve: 0.8919

roc.test(auc1, auc2)
## 
##  DeLong's test for two correlated ROC curves
## 
## data:  auc1 and auc2
## Z = 0.23933, p-value = 0.8109
## alternative hypothesis: true difference in AUC is not equal to 0
## 95 percent confidence interval:
##  -0.006583812  0.008415314
## sample estimates:
## AUC of roc1 AUC of roc2 
##   0.8928571   0.8919414


tr <- summary(model_egfr)$coefficients[-1, c(1,4)]
colnames(tr)[1] <- 'Odds ratio'
tr[,1] <- round(exp(tr[,1]), 3)
tr[,2] <- round(tr[,2], 4)
kableExtra::kable(tr)
Odds ratio Pr(>|z|)
egfr 0.004 0.0002
dsapos 0.643 0.5947
TX_order2+ 10.771 0.0645
log2(il18_free) 1.091 0.8437

7.7 Il-36b model

Open code

wdat_sbs <- wdat %>% filter(!is.na(il36_b_value))

model <- glm(rejection ~ 
               dsa +
               TX_order + 
               log2(il36_b_value), 
             data = wdat_sbs,
             family = binomial(link = 'logit'))

basemod <- update(model, ~ . -log2(il36_b_value))
AIC(model) - AIC(basemod)
## [1] -2.638931
tr <- data.frame(pred_b = as.numeric(predict(basemod)),
                 pred = as.numeric(predict(model)),
                 reject = model$model$rejection)
auc1 <- roc(response = tr$reject, predictor = tr$pred_b)
## Setting levels: control = 0, case = 1
## Setting direction: controls < cases
auc1
## 
## Call:
## roc.default(response = tr$reject, predictor = tr$pred_b)
## 
## Data: tr$pred_b in 39 controls (tr$reject 0) < 28 cases (tr$reject 1).
## Area under the curve: 0.6273

auc2 <- roc(response = tr$reject, predictor = tr$pred)
## Setting levels: control = 0, case = 1
## Setting direction: controls < cases
auc2
## 
## Call:
## roc.default(response = tr$reject, predictor = tr$pred)
## 
## Data: tr$pred in 39 controls (tr$reject 0) < 28 cases (tr$reject 1).
## Area under the curve: 0.7253

roc.test(auc1, auc2)
## 
##  DeLong's test for two correlated ROC curves
## 
## data:  auc1 and auc2
## Z = -1.5905, p-value = 0.1117
## alternative hypothesis: true difference in AUC is not equal to 0
## 95 percent confidence interval:
##  -0.21872871  0.02275802
## sample estimates:
## AUC of roc1 AUC of roc2 
##   0.6272894   0.7252747
  
tr <- summary(model)$coefficients[-1, c(1,4)]
colnames(tr)[1] <- 'Odds ratio'
tr[,1] <- round(exp(tr[,1]),2)
tr[,2] <- round(tr[,2], 4)
kableExtra::kable(tr)
Odds ratio Pr(>|z|)
dsapos 1.28 0.7314
TX_order2+ 6.75 0.1157
log2(il36_b_value) 0.64 0.0683
Open code



model_egfr <- glm(rejection ~ 
               egfr + 
               dsa + 
               #anti_hla +
               TX_order + 
               #induction_therapy +
               log2(il36_b_value), 
             data = wdat_sbs,
             family = binomial(link = 'logit'))

basemod <- update(model_egfr, ~ . -log2(il36_b_value))
AIC(model_egfr) - AIC(basemod)  
## [1] 1.400189
tr <- data.frame(pred_b = as.numeric(predict(basemod)),
                 pred = as.numeric(predict(model_egfr)),
                 reject = model_egfr$model$rejection)
auc1 <- roc(response = tr$reject, predictor = tr$pred_b)
## Setting levels: control = 0, case = 1
## Setting direction: controls < cases
auc1
## 
## Call:
## roc.default(response = tr$reject, predictor = tr$pred_b)
## 
## Data: tr$pred_b in 39 controls (tr$reject 0) < 28 cases (tr$reject 1).
## Area under the curve: 0.8929

auc2 <- roc(response = tr$reject, predictor = tr$pred)
## Setting levels: control = 0, case = 1
## Setting direction: controls < cases
auc2
## 
## Call:
## roc.default(response = tr$reject, predictor = tr$pred)
## 
## Data: tr$pred in 39 controls (tr$reject 0) < 28 cases (tr$reject 1).
## Area under the curve: 0.8984

roc.test(auc1, auc2)
## 
##  DeLong's test for two correlated ROC curves
## 
## data:  auc1 and auc2
## Z = -0.71193, p-value = 0.4765
## alternative hypothesis: true difference in AUC is not equal to 0
## 95 percent confidence interval:
##  -0.020620992  0.009631981
## sample estimates:
## AUC of roc1 AUC of roc2 
##   0.8928571   0.8983516


tr <- summary(model_egfr)$coefficients[-1, c(1,4)]
colnames(tr)[1] <- 'Odds ratio'
tr[,1] <- round(exp(tr[,1]), 3)
tr[,2] <- round(tr[,2], 4)
kableExtra::kable(tr)
Odds ratio Pr(>|z|)
egfr 0.005 0.0003
dsapos 0.550 0.4886
TX_order2+ 10.310 0.0719
log2(il36_b_value) 0.828 0.4688

8 Reproducibility

Open code
sessionInfo()
## R version 4.3.3 (2024-02-29)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Ubuntu 22.04.4 LTS
## 
## Matrix products: default
## BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.10.0 
## LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.10.0
## 
## locale:
##  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
##  [3] LC_TIME=cs_CZ.UTF-8        LC_COLLATE=en_US.UTF-8    
##  [5] LC_MONETARY=cs_CZ.UTF-8    LC_MESSAGES=en_US.UTF-8   
##  [7] LC_PAPER=cs_CZ.UTF-8       LC_NAME=C                 
##  [9] LC_ADDRESS=C               LC_TELEPHONE=C            
## [11] LC_MEASUREMENT=cs_CZ.UTF-8 LC_IDENTIFICATION=C       
## 
## time zone: Europe/Prague
## tzcode source: system (glibc)
## 
## attached base packages:
## [1] stats     graphics  grDevices utils     datasets  methods   base     
## 
## other attached packages:
##  [1] lqmm_1.5.8       effects_4.2-2    rstudioapi_0.13  quantreg_5.88   
##  [5] SparseM_1.81     coxed_0.3.3      survival_3.5-8   rms_6.7-1       
##  [9] Hmisc_5.1-1      bayesplot_1.8.1  ggdist_3.3.2     kableExtra_1.4.0
## [13] lubridate_1.8.0  corrplot_0.92    arm_1.13-1       lme4_1.1-35.1   
## [17] MASS_7.3-60      janitor_2.2.0    RJDBC_0.2-10     rJava_1.0-6     
## [21] DBI_1.1.2        projpred_2.8.0   brms_2.16.3      Rcpp_1.0.12     
## [25] glmnet_4.1-8     Matrix_1.6-5     boot_1.3-30      cowplot_1.1.1   
## [29] pROC_1.18.0      mgcv_1.9-1       nlme_3.1-163     openxlsx_4.2.5  
## [33] flextable_0.9.5  sjPlot_2.8.15    car_3.1-2        carData_3.0-5   
## [37] gtsummary_1.7.2  emmeans_1.7.2    ggpubr_0.4.0     forcats_1.0.0   
## [41] stringr_1.5.1    dplyr_1.1.4      purrr_1.0.2      readr_2.1.2     
## [45] tidyr_1.3.1      tibble_3.2.1     ggplot2_3.5.0    tidyverse_1.3.1 
## 
## loaded via a namespace (and not attached):
##   [1] fs_1.6.3                matrixStats_1.2.0       httr_1.4.2             
##   [4] insight_0.19.8          SparseGrid_0.8.2        tools_4.3.3            
##   [7] backports_1.4.1         sjlabelled_1.2.0        utf8_1.2.4             
##  [10] R6_2.5.1                DT_0.17                 withr_3.0.0            
##  [13] Brobdingnag_1.2-7       prettyunits_1.1.1       gridExtra_2.3          
##  [16] cli_3.6.2               textshaping_0.3.6       performance_0.10.9     
##  [19] gt_0.10.1               shinyjs_2.1.0           officer_0.6.5          
##  [22] sandwich_3.0-1          labeling_0.4.2          sass_0.4.8             
##  [25] mvtnorm_1.1-3           polspline_1.1.24        ggridges_0.5.3         
##  [28] askpass_1.1             commonmark_1.9.1        systemfonts_1.0.4      
##  [31] StanHeaders_2.21.0-7    foreign_0.8-86          gfonts_0.2.0           
##  [34] svglite_2.1.0           readxl_1.3.1            httpcode_0.3.0         
##  [37] generics_0.1.2          shape_1.4.6.1           gtools_3.9.2           
##  [40] crosstalk_1.2.0         distributional_0.4.0    zip_2.2.0              
##  [43] inline_0.3.19           loo_2.4.1               fansi_1.0.6            
##  [46] abind_1.4-5             lifecycle_1.0.4         multcomp_1.4-18        
##  [49] yaml_2.3.5              snakecase_0.11.1        grid_4.3.3             
##  [52] promises_1.2.0.1        crayon_1.5.2            miniUI_0.1.1.1         
##  [55] lattice_0.22-5          haven_2.4.3             pillar_1.9.0           
##  [58] knitr_1.45              estimability_1.3        shinystan_2.5.0        
##  [61] codetools_0.2-19        glue_1.7.0              fontLiberation_0.1.0   
##  [64] data.table_1.15.2       broom.helpers_1.14.0    vctrs_0.6.5            
##  [67] cellranger_1.1.0        gtable_0.3.4            assertthat_0.2.1       
##  [70] xfun_0.42               mime_0.12               survey_4.2-1           
##  [73] coda_0.19-4             rsconnect_0.8.25        iterators_1.0.14       
##  [76] shinythemes_1.2.0       ellipsis_0.3.2          TH.data_1.1-0          
##  [79] pbkrtest_0.5.2          xts_0.12.1              fontquiver_0.2.1       
##  [82] threejs_0.3.3           rstan_2.21.3            tensorA_0.36.2         
##  [85] rpart_4.1.23            colorspace_2.1-0        nnet_7.3-19            
##  [88] tidyselect_1.2.0        processx_3.8.3          compiler_4.3.3         
##  [91] curl_4.3.2              rvest_1.0.2             htmlTable_2.4.0        
##  [94] xml2_1.3.3              fontBitstreamVera_0.1.1 bayestestR_0.13.2      
##  [97] colourpicker_1.1.1      posterior_1.2.0         checkmate_2.0.0        
## [100] scales_1.3.0            dygraphs_1.1.1.6        callr_3.7.5            
## [103] digest_0.6.34           minqa_1.2.4             rmarkdown_2.26         
## [106] htmltools_0.5.7         pkgconfig_2.0.3         base64enc_0.1-3        
## [109] dbplyr_2.1.1            fastmap_1.1.1           rlang_1.1.3            
## [112] htmlwidgets_1.6.4       shiny_1.8.0             farver_2.1.1           
## [115] zoo_1.8-9               jsonlite_1.8.8          magrittr_2.0.3         
## [118] Formula_1.2-4           munsell_0.5.0           gdtools_0.3.7          
## [121] stringi_1.8.3           plyr_1.8.9              pkgbuild_1.3.1         
## [124] parallel_4.3.3          sjmisc_2.8.9            ggeffects_1.5.0        
## [127] splines_4.3.3           hms_1.1.1               sjstats_0.18.2         
## [130] ps_1.7.6                igraph_1.5.1            uuid_1.0-3             
## [133] ggsignif_0.6.3          markdown_1.12           reshape2_1.4.4         
## [136] stats4_4.3.3            rstantools_2.1.1        crul_1.4.0             
## [139] reprex_2.0.1            evaluate_0.23           mitools_2.4            
## [142] RcppParallel_5.1.7      modelr_0.1.8            nloptr_2.0.0           
## [145] tzdb_0.4.0              foreach_1.5.2           httpuv_1.6.5           
## [148] MatrixModels_0.5-0      openssl_1.4.6           broom_1.0.5            
## [151] xtable_1.8-4            rstatix_0.7.0           later_1.3.0            
## [154] viridisLite_0.4.2       ragg_1.2.1              cluster_2.1.6          
## [157] bridgesampling_1.1-2